コード例 #1
0
ファイル: Scaling.cpp プロジェクト: CRRobotics/2016Robot
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);
}
コード例 #2
0
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...
}