本文整理汇总了C++中Compressor::Start方法的典型用法代码示例。如果您正苦于以下问题:C++ Compressor::Start方法的具体用法?C++ Compressor::Start怎么用?C++ Compressor::Start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Compressor
的用法示例。
在下文中一共展示了Compressor::Start方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ManageCompressor
void ManageCompressor () {
if (m_compressor->GetPressureSwitchValue()) {
m_compressor->Stop();
} else {
m_compressor->Start();
}
}
示例2: OperatorControl
void OperatorControl(void)
{
OperatorControlInit();
compressor.Start();
testActuator.Start();
while (IsOperatorControl())
{
ProgramIsAlive();
//No need to do waits because ProgramIsAlive function does a wait. //Wait(0.005);
bool isButtonPressed = stick.GetRawButton(3);
SmartDashboard::PutNumber("Actuator Button Status",isButtonPressed);
if (isButtonPressed)
{
testActuator.Go();
}
float leftYaxis = stick.GetY();
float rightYaxis = stick.GetRawAxis(5); //RawAxis(5);
TankDrive(leftYaxis,rightYaxis); // drive with arcade style (use right stick)for joystick 1
SmartDashboard::PutNumber("Left Axis",leftYaxis);
SmartDashboard::PutNumber("Right Axis",rightYaxis);
}
}
示例3: AutonomousPeriodic
void AutonomousPeriodic(void)
{
//Start compressor
compressor->Start();
//Autonomous code goes here
}
示例4: TeleopPeriodic
void TeleopPeriodic(void )
{
/*
* Code placed in here will be called only when a new packet of information
* has been received by the Driver Station. Any code which needs new information
* from the DS should go in here
*/
//Start compressor
compressor->Start();
driveTrainValues();
deadzone();
//Drivetrain.....
//When button eight is pressed robot drives at 25% speed
printf("right: %f and left: %f\n", useright, useleft);
if (gamepad->GetRawButton(8))
{
drivetrain->TankDrive((-0.5*(useleft)), (-0.5*(useright)));
//Negative for switched wires
}
else
{
drivetrain->SetLeftRightMotorOutputs(-useleft, -useright);
//Normal driving
//Negative for switched wires
}
}
示例5: OperatorControl
/**
* Runs the motors with arcade steering.
*/
void OperatorControl(void)
{
GetWatchdog().SetEnabled(true);
compressor->Start();
GetWatchdog().SetExpiration(0.5);
bool valve_state = false;
while (IsOperatorControl())
{
motor->Set(stick->GetY());
if (stick->GetRawButton(1) && !valve_state)
{
valve->Set(true);
valve_state = true;
}
if (!stick->GetRawButton(1) && valve_state)
{
valve->Set(false);
valve_state = false;
}
// Update driver station
//dds->sendIOPortData(valve);
GetWatchdog().Feed();
}
}
示例6: CANJaguar
RobotSystem(void):
robotInted(false)
,stick(1) // as they are declared above.
,stick2(2)
,line1(10)
,line2(11)
,line3(12)
//,camera(AxisCamera::GetInstance())
,updateCAN("CANUpdate",(FUNCPTR)UpdateCAN)
,cameraTask("CAMERA", (FUNCPTR)CameraTask)
,compressor(14,1)
,EncArm(2,3)
,EncClaw(5,6)
,PIDArm(.04,0,0) // .002, .033
,PIDClaw(.014,.0000014,0)
,LowArm(.1)
/*
,MiniBot1(4)
,MiniBot2(2)
,ClawGrip(3)
*/
,MiniBot1a(8,1)
,MiniBot1b(8,2)
,MiniBot2a(8,3)
,MiniBot2b(8,4)
,ClawOpen(8, 8)
,ClawClose(8,7)
,LimitClaw(7)
,LimitArm(13)
{
// myRobot.SetExpiration(0.1);
GetWatchdog().SetEnabled(false);
GetWatchdog().SetExpiration(1);
compressor.Start();
debug("Waiting to init CAN");
Wait(2);
Dlf = new CANJaguar(6,CANJaguar::kSpeed);
Dlb = new CANJaguar(3,CANJaguar::kSpeed);
Drf = new CANJaguar(7,CANJaguar::kSpeed);
Drb = new CANJaguar(2,CANJaguar::kSpeed);
arm1 = new CANJaguar(5);
arm1_sec = new CANJaguar(8);
arm2 = new CANJaguar(4);
EncArm.SetDistancePerPulse(.00025);
EncClaw.SetDistancePerPulse(.00025);
EncClaw.SetReverseDirection(false);
EncArm.SetReverseDirection(true);
EncArm.Reset();
EncClaw.Reset();
updateCAN.Start((int)this);
//cameraTask.Start((int)this);
EncArm.Start();
EncClaw.Start();
debug("done initing");
}
示例7: RobotInit
virtual void RobotInit() {
CommandBase::init();
mainCompressor = new Compressor(COMPRESSOR_PRESSURE_SWITCH, COMPRESSOR_RELAY);// COMPRESSOR_RELAY);
autonomousCommand = new cmdAutonomousScheduler(); //DEFINE COMMANDS HERE
mainCompressor->Start();
CommandBase::loaderSubsystem->LowerLoader();
CommandBase::winchSubsystem->Retract();
}
示例8: TeleopPeriodic
void TeleopPeriodic()
{
comp599->Start();
while(IsOperatorControl())
{
teleDrive();
}
}
示例9: RobotInit
virtual void RobotInit()
{
CommandBase::init();
SmartDashboard::init();
autonomousCommand = new AutonomousCommandGroup();
compressor = new Compressor(COMPRESSOR_SWITCH, COMPRESSOR_RELAY);
compressor->Start();
}
示例10: RobotInit
void RobotInit(void)
{
/* Once the start function is called no further programming
* is required. However if needed the Stop() function can be
* called.
* */
airCompressor->Start();
}
示例11: toggleCompressor
void RobotDemo::toggleCompressor(){
if(compressor->Enabled()){
compressor->Stop();
}
else{
compressor->Start();
}
}
示例12:
/**
* Initialization code for test mode should go here.
*
* Use this method for initialization code which will be called each time
* the robot enters test mode.
*/
void RA14Robot::TestInit() {
myCam->Disable();
myCompressor->Start();
Config::LoadFromFile("config.txt");
Config::Dump();
myCamera->Set(Relay::kForward); // turn on light
}
示例13: TeleopInit
void TeleopInit()
{
step = 0;
drive->setLinVelocity(0);
drive->setTurnSpeed(0, false);
drive->drive();
comp599->Start();
timer->Start();
}
示例14: CommandBasedRobot
CommandBasedRobot() {
compressor = new Compressor(PRESSURE_SWITCH_PORT, COMPRESSOR_RELAY_PORT);
compressor->Start();
driveStyle = new SendableChooser();
driveStyle->AddDefault("Arcade", new ArcadeDrive());
driveStyle->AddObject("Tank", new TankDrive());
CommandBase::init();
}
示例15: AutonomousInit
void AutonomousInit(void) {
printf("Robot autonomous initializing...\n");
GetWatchdog().Feed();
compressor->Start();
kicker->Reset();
printf("Robot autonomous initialization complete.\n");
}