当前位置: 首页>>代码示例>>C++>>正文


C++ Compressor::Start方法代码示例

本文整理汇总了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();
		}
	}
开发者ID:hal7df,项目名称:further-suggestions,代码行数:7,代码来源:BuiltinDefaultCode.cpp

示例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);
        }
    }
开发者ID:spanut01,项目名称:FRCTeam1967,代码行数:26,代码来源:JankyActuatorTest.cpp

示例3: AutonomousPeriodic

	void AutonomousPeriodic(void) 
	{
		//Start compressor
		compressor->Start();
		
		//Autonomous code goes here
	}
开发者ID:risapez,项目名称:2012-Robotics,代码行数:7,代码来源:MyRobot.cpp

示例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
		}		
		
	}
开发者ID:risapez,项目名称:2012-Robotics,代码行数:30,代码来源:MyRobot.cpp

示例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();
		}
	}
开发者ID:FRC2994,项目名称:FRC2994,代码行数:34,代码来源:MyRobot.cpp

示例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");
	}
开发者ID:nerdherd,项目名称:FRC-2011,代码行数:60,代码来源:MyRobot.cpp

示例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();
	}
开发者ID:TheGheff,项目名称:2014-FRC_4121,代码行数:8,代码来源:CommandBasedRobot.cpp

示例8: TeleopPeriodic

	void TeleopPeriodic()
	{
		comp599->Start();
		while(IsOperatorControl())
		{
			 teleDrive();
		}
	}
开发者ID:Robodox-599,项目名称:2013_Medic,代码行数:8,代码来源:Medic.cpp

示例9: RobotInit

 virtual void RobotInit()
 {
   CommandBase::init();
   SmartDashboard::init();
   autonomousCommand = new AutonomousCommandGroup();
   compressor = new Compressor(COMPRESSOR_SWITCH, COMPRESSOR_RELAY);
   compressor->Start();
 }
开发者ID:frc1334,项目名称:UltimateAscent2013,代码行数:8,代码来源:UltimateAscentBot.cpp

示例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();
 }
开发者ID:Joekachu,项目名称:FRC4633,代码行数:8,代码来源:MyRobot.cpp

示例11: toggleCompressor

void RobotDemo::toggleCompressor(){
	if(compressor->Enabled()){
		compressor->Stop();
	}
	else{
		compressor->Start();
	}
}
开发者ID:Iron-Panthers,项目名称:Iron-Panthers,代码行数:8,代码来源:robotTemplate.cpp

示例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
	}
开发者ID:RAR1741,项目名称:RA14_RobotCode,代码行数:14,代码来源:RobotMain.cpp

示例13: TeleopInit

	void TeleopInit()
	{
		step = 0;
		drive->setLinVelocity(0);
		drive->setTurnSpeed(0, false);
		drive->drive();
		comp599->Start();
		timer->Start();		
	}
开发者ID:Robodox-599,项目名称:2014_Anesthesiologist,代码行数:9,代码来源:Anesthesiologist.cpp

示例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();
 }
开发者ID:MMRambotics,项目名称:Rambot2012,代码行数:10,代码来源:CommandBasedRobot.cpp

示例15: AutonomousInit

	void AutonomousInit(void) {
		printf("Robot autonomous initializing...\n");

		GetWatchdog().Feed();
		
		compressor->Start();
		kicker->Reset();
		
		printf("Robot autonomous initialization complete.\n");
	}
开发者ID:Tanner,项目名称:Team-1261---C--,代码行数:10,代码来源:Chimichanga.cpp


注:本文中的Compressor::Start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。