本文整理汇总了C++中Drive::SetHighGear方法的典型用法代码示例。如果您正苦于以下问题:C++ Drive::SetHighGear方法的具体用法?C++ Drive::SetHighGear怎么用?C++ Drive::SetHighGear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drive
的用法示例。
在下文中一共展示了Drive::SetHighGear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Test
//.........这里部分代码省略.........
{
motors[2]->Set(0);
}
/*RIGHT DRIVE*/
if (driverStick->GetRawButton(5))
{
motors[3]->Set(0.8);
}
else
{
motors[3]->Set(0);
}
/*
if (driverStick->GetRawButton(6))
{
redlights->Set(redlights->kForward);
}
else
{
redlights->Set(redlights->kOff);
}
*/
/*CHOOCHOO MOTOR*/
if (driverStick->GetRawButton(7) && driverStick->GetRawButton(1))
{
motors[4]->Set(0.6);
}
else
{
motors[4]->Set(0);
}
/*CAMERA LED*/
if (driverStick->GetRawButton(8))
{
cameraLights->Set(cameraLights->kForward);
}
else
{
cameraLights->Set(cameraLights->kOff);
}
/*
if (curShiftButtonPressed && !prevShiftButttonPressed)
{
drive->SetHighGear(!gear);
}
*/
if (driverStick->GetRawButton(10))
{
drive->SetHighGear(true);//!gear
gear = !gear;
}
else{
drive->SetHighGear(false);
}
/*COMPRESSOR*/
if(driverStick->GetRawButton(11))
{
compressorOn = true;
//compressor->Set(compressor->kOn);
//compressor->Start();
}
else
{
//compressor->Stop();
}
if(driverStick->GetRawButton(9))
{
compressorOn = false;
//compressor->Set(compressor->kOff);
//compressor->Stop();
}
if(compressorOn){
if(!compressorLimitSwitch->Get()){
compressor->Set(compressor->kOn);
}
else{
compressor->Set(compressor->kOff);
compressorOn = false;
}
}
else
compressor->Set(compressor->kOff);
prevShiftButttonPressed = curShiftButtonPressed;
}
}