Scaling::Scaling() : Subsystem("Scaling") { // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS scaleLift = RobotMap::scalingscaleLift; scaleLimit = RobotMap::scalingscaleLimit; // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS ChangeControlMode(CANTalon::ControlMode::kPercentVbus); }
void SmartSpeedCANJaguar::Initialize() { ChangeControlMode(kSpeed); // Set for speed mode SetSpeedReference(CANJaguar::kSpeedRef_Encoder); // Define the encoder type ConfigEncoderCodesPerRev(encoderPulsesPerRevolution); // Define the lines per revolution CANJaguar::SetPID(pid_P, pid_I, pid_D); // Set our passed in PID constants EnableControl(); // Must enable the control paramaters CANJaguar::Set(lastSetSpeed); // Restore the last target speed... }