/** * Write out the PID value as seen in the PIDOutput base object. * * @deprecated Call Set instead. * * @param output Write out the PercentVbus value as was computed by the * PIDController */ void CANTalon::PIDWrite(float output) { if (GetControlMode() == kPercentVbus) { Set(output); } else { wpi_setWPIErrorWithContext(IncompatibleMode, "PID only supported in PercentVbus mode"); } }
void SmartSpeedCANJaguar::PeriodicService() { static int counter = 0; if(lastSetSpeed < 0) // Do nothing until speed has been set return; if(++counter %20 == 0){ // Let's just check every second or so rather thaan at 20 Hz, same some traffic... if(GetControlMode() != CANJaguar::kSpeed){ printf("Speed Jaguar Reset, Reinitializing\n"); Initialize(); } } }