本文整理汇总了C++中DriverStation::GetInstance方法的典型用法代码示例。如果您正苦于以下问题:C++ DriverStation::GetInstance方法的具体用法?C++ DriverStation::GetInstance怎么用?C++ DriverStation::GetInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DriverStation
的用法示例。
在下文中一共展示了DriverStation::GetInstance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dseio
Robot(void) : dseio(ds->GetInstance()->GetEnhancedIO())
{
this->SetPeriod(.05);
FL = new Jaguar(PWM_PORT_5);
RL = new Jaguar(PWM_PORT_7);
FR = new Jaguar(PWM_PORT_4);
RR = new Jaguar(PWM_PORT_6);
mygyro = new Gyro(AI_PORT_1);
drive = new RobotDrive(FL,RL,FR,RR);
drive->SetInvertedMotor(RobotDrive::kFrontRightMotor, true);
drive->SetInvertedMotor(RobotDrive::kRearRightMotor,true);
drive->SetInvertedMotor(RobotDrive::kFrontLeftMotor, true);//inversed because motor physically spins in the rwrong direction
drive->SetInvertedMotor(RobotDrive::kRearLeftMotor, false);
drive->SetExpiration(15);
left = new DigitalInput(DI_PORT_1);
middle = new DigitalInput(DI_PORT_2);
right = new DigitalInput(DI_PORT_3);
StraightLineSwitch = new DigitalInput(DI_PORT_5);
GoLeftSwitch = new DigitalInput(DI_PORT_6);
robot_compressor = new Compressor(DI_PORT_4,DO_PORT_1);
rightStick = new Joystick(1);
leftStick = new Joystick(2);
myarm = new DDCArm();
deploy = new Deployment();
autotimer = new Timer();
}