void TeleopInit() { // Initialize the encoder sampleEncoder = new Encoder(0, 1, false, Encoder::EncodingType::k4X); sampleEncoder->SetMaxPeriod(.1); sampleEncoder->SetMinRate(10); sampleEncoder->SetDistancePerPulse(5); sampleEncoder->SetReverseDirection(true); sampleEncoder->SetSamplesToAverage(7); // Initialize the joystick joystick = new Joystick(0); // Initialize the motor motor = new Victor(9); // Initialize the gear tooth counter toothTrigger = new AnalogTrigger(3); toothTrigger->SetLimitsRaw(250, 3600); gearToothCounter = new Counter(toothTrigger); // gearToothCounter->SetUpDownCounterMode(); }