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


C++ DriverStationLCD::Clear方法代码示例

本文整理汇总了C++中DriverStationLCD::Clear方法的典型用法代码示例。如果您正苦于以下问题:C++ DriverStationLCD::Clear方法的具体用法?C++ DriverStationLCD::Clear怎么用?C++ DriverStationLCD::Clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DriverStationLCD的用法示例。


在下文中一共展示了DriverStationLCD::Clear方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Autonomous

	void Autonomous(void)
	{
		dsLCD->Clear();
		dsLCD->PrintfLine(DriverStationLCD::kUser_Line1, "2013 Test Fix");
		dsLCD->PrintfLine(DriverStationLCD::kUser_Line2, "Autonomous Mode");
		dsLCD->UpdateLCD();
	}
开发者ID:D3ZOMBKEELA,项目名称:TestProg,代码行数:7,代码来源:MyRobot.cpp

示例2: OperatorControl

	/**
	 * Runs the motors with arcade steering. 
	 */
	void OperatorControl(void)
	{
		HSLImage *Himage;
		Threshold targetThreshold(247, 255, 60, 140, 10, 50);
		BinaryImage *matchingPixels;
		vector<ParticleAnalysisReport> *pReport;
		
		//myRobot->SetSafetyEnabled(true);
		Saftey->SetEnabled(false);
		AxisCamera &mycam = AxisCamera::GetInstance("10.15.10.11");
		
		mycam.WriteResolution(AxisCamera::kResolution_640x480);
		mycam.WriteCompression(20);
		mycam.WriteBrightness(25);
		Wait(3.0);
         
		dsLCD = DriverStationLCD::GetInstance();
		dsLCD->Clear();
		
		float X[2];
		float Y[2];
		float Z[2];
		
		while(IsOperatorControl())
		{
			X[1] = Stick1->GetX();
			X[2] = Stick2->GetX();
			Y[1] = Stick1->GetY();
			Y[2] = Stick2->GetY();
			Z[1] = Stick1->GetZ();
			Z[2] = Stick2->GetZ();
			
			Jaguar1->Set(Y[1]);
			Jaguar2->Set(Y[2]);
			
			Wait(0.005);
			if (mycam.IsFreshImage())
						{
							Himage = mycam.GetImage();
							
							matchingPixels = Himage->ThresholdHSL(targetThreshold);
							pReport = matchingPixels->GetOrderedParticleAnalysisReports();
							
							for (unsigned int i = 0; i < pReport->size(); i++)
							{
								printf("Index: %d X Center: %d Y Center: %d \n", i, (*pReport)[i].center_mass_x, (*pReport)[i].center_mass_y);
								
							}
							
							delete Himage;
							delete matchingPixels;
							delete pReport;
						}
			
		}
		
			
			//myRobot->ArcadeDrive(stick); // drive with arcade style (use right stick)
			//Wait(0.005);				// wait for a motor update time
	}
开发者ID:apgoetz,项目名称:FRC2012,代码行数:63,代码来源:MyRobot.cpp

示例3: LCDControl

	DriverStationLCDTextExample()
	{
		dsLCD = DriverStationLCD::GetInstance();
		dsLCD->Clear();
		control = new LCDControl();
		dsLCD->UpdateLCD();
	}
开发者ID:2202Programming,项目名称:OldCode,代码行数:7,代码来源:DriverStationLCDTextExample.cpp

示例4: OperatorControl

	void OperatorControl()
	{
		// Loop counter to ensure that the program is running (debug helper
		// that can be removed when things get more stable)
		int sanity, bigSanity = 0;
		
		gamepad.Update();

		while (IsOperatorControl() && IsEnabled())
		{
			controls = Controls::GetInstance();
			
			controls->SetSpeed(LEFT_DRIVE_PWM, -1.0 * gamepad.GetRightY());
			controls->SetSpeed(RIGHT_DRIVE_PWM, -1.0 * gamepad.GetRightY());
			
			gamepad.Update();
			
			dsLCD->Clear();
			dsLCD->PrintfLine(DriverStationLCD::kUser_Line1, "2013 Test Fix");
			dsLCD->PrintfLine(DriverStationLCD::kUser_Line2, "Teleop Mode");
			dsLCD->PrintfLine(DriverStationLCD::kUser_Line6, "bigSanity: %d", sanity);
			dsLCD->UpdateLCD();
			sanity++;
			if (0 == sanity % 20)
			{
				bigSanity++;
			}

			Wait(0.05);				// wait for a motor update time
		}
	}
开发者ID:D3ZOMBKEELA,项目名称:TestProg,代码行数:31,代码来源:MyRobot.cpp

示例5: RobotInit

	void RobotInit(void)
	{
		DriverStationLCD *dsLCD = DriverStationLCD::GetInstance();
		dsLCD->Clear();
		dsLCD->UpdateLCD();
		//blnShift = true;
		}
开发者ID:highlandprogramming,项目名称:WIP-2014-Code-FRC,代码行数:7,代码来源:MyRobot.cpp

示例6: updateDriverStation

void Zed::updateDriverStation()
{
    DriverStationLCD* lcd = DriverStationLCD::GetInstance();
    lcd->Clear();
    lcd->PrintfLine(DriverStationLCD::kUser_Line1, 0, "Shooter Speed: %f",
            shooterSpeed);
    lcd->UpdateLCD();
}
开发者ID:TheGreenMachine,项目名称:Zed-C,代码行数:8,代码来源:Zed.cpp

示例7: signalControlVoltage

	RobotDemo(void) :
		signal(3), signalControlVoltage(7) {
		dsLCD = DriverStationLCD::GetInstance();
		dsLCD->Clear();
		dsLCD->PrintfLine(DriverStationLCD::kUser_Line1, "SonarTest");
		dsLCD->UpdateLCD();

	}
开发者ID:2202Programming,项目名称:OldCode,代码行数:8,代码来源:Sonar.cpp

示例8:

	Hohenheim(void) {
		driverStation = DriverStation::GetInstance();
		dsLCD = DriverStationLCD::GetInstance();
		pneumaticsControl = PneumaticsControl::getInstance();
		shooterControl = ShooterControl::getInstance();
		dsLCD->Clear();
		dsLCD->PrintfLine(DriverStationLCD::kUser_Line1, "Hohenheim 2014 V 3.1");
		dsLCD->UpdateLCD();
		GetWatchdog().SetEnabled(false);
	}
开发者ID:2202Programming,项目名称:OldCode,代码行数:10,代码来源:Hohenheim.cpp

示例9:

	RobotDemo(void):
		myRobot(1, 2),	// these must be initialized in the same order
		stick(1)		// as they are declared above.
	{
		dsLCD = DriverStationLCD::GetInstance();
		dsLCD->Clear();
		dsLCD->PrintfLine(DriverStationLCD::kUser_Line1, "XboxController2");
		dsLCD->UpdateLCD();
		myRobot.SetExpiration(0.1);
	}
开发者ID:2202Programming,项目名称:OldCode,代码行数:10,代码来源:MyRobot.cpp

示例10: Relay

	SebastianRobot(void) {
		dsLCD = DriverStationLCD::GetInstance();
		dsLCD->Clear();
		dsLCD->PrintfLine(DriverStationLCD::kUser_Line1, "Sebastian V24.2");
		dsLCD->UpdateLCD();
		GetWatchdog().SetEnabled(false);
		led0 = new Relay(2);
		led1 = new Relay(3);
		flashCount = 0;
		led0->Set(Relay::kOff);
		led1->Set(Relay::kOff);
		isFlashing=false;
	}
开发者ID:2202Programming,项目名称:OldCode,代码行数:13,代码来源:SebastianRobot.cpp

示例11: feed

//should move this to helper function
void robot::feed()
{
	DriverStationLCD *lcd = DriverStationLCD::GetInstance();
	lcd->Clear();
	float th = gyro.getangle();
	a = qmod(th * dt + a, -180, 180);
	lcd->PrintfLine(DriverStationLCD::kUser_Line1, "BUILD: %i", BUILD);
	lcd->PrintfLine(DriverStationLCD::kUser_Line2, "%f", gyrob.GetAngle());
	lcd->PrintfLine(DriverStationLCD::kUser_Line3, "%f", arma.GetVoltage());
	lcd->PrintfLine(DriverStationLCD::kUser_Line4, "%f", armb.GetVoltage());
	//lcd->PrintfLine(DriverStationLCD::kUser_Line5, "%f", aa);
	lcd->UpdateLCD();
}
开发者ID:electromatter,项目名称:FRC122-2014,代码行数:14,代码来源:Robot.cpp

示例12: Disabled

	void Disabled()
	{
		while(IsDisabled())
		{
			LEDLight->Set(Relay::kForward);
			rpi->Read();
			lcd->Clear();
			lcd->Printf(DriverStationLCD::kUser_Line3, 1, "R: %i", rpi->GetMissingPacketcount());
			lcd->Printf(DriverStationLCD::kUser_Line1, 1, "x: %i", rpi->GetXPos());
			lcd->Printf(DriverStationLCD::kUser_Line2, 1, "y: %i", rpi->GetYPos());

			lcd->UpdateLCD();
		}
	}
开发者ID:robotics1714,项目名称:2014-Code,代码行数:14,代码来源:MyRobot.cpp

示例13: Print

	void Print ()
		{
			if (PrintTime.Get() > PRINT_TIME)
			{
				lcd->Clear();
				lcd->Printf(DriverStationLCD::kUser_Line1, 1, "Left Speed = %5.4f", PrimaryController.GetRawAxis(LEFT_JOYSTICK));
				lcd->Printf(DriverStationLCD::kUser_Line2, 1, "Right Speed = %5.4f", PrimaryController.GetRawAxis(RIGHT_JOYSTICK));
				lcd->Printf(DriverStationLCD::kUser_Line3, 1, "Charge State = %d", (int)Shooter.chargestate);
				//lcd->Printf(DriverStationLCD::kUser_Line4, 1, "Collector speed= %d", Collector.CollectorSpeed());
				lcd->UpdateLCD();
				PrintTime.Reset();
				PrintTime.Start();
			}
		}
开发者ID:Team537,项目名称:RobotCode,代码行数:14,代码来源:MyRobot.cpp

示例14: OperatorControl

	void OperatorControl(void) {
		XboxController *xbox = XboxController::getInstance();

		bool isEndGame = false;
		GetWatchdog().SetEnabled(true);
		_driveControl.initialize();
		//_poleVaultControl.initialize();
		shooterControl.InitializeOperator();
		while (IsEnabled() && IsOperatorControl()) {
			GetWatchdog().Feed();
			dsLCD->Clear();
			if (xbox->isEndGame()) {
				isEndGame = !isEndGame;
			}
			if (!isEndGame) {
				shooterControl.Run();
				//_poleVaultControl.act();
				_driveControl.act();
				dsLCD->PrintfLine(DriverStationLCD::kUser_Line1, "Normal");
				led0->Set((shooterControl.getLED1())?Relay::kOn: Relay::kOff);
				led1->Set((shooterControl.getLED2())?Relay::kOn: Relay::kOff);
			}

			else {
				shooterControl.RunEndGame();
				//_poleVaultControl.actEndGame();
				_driveControl.actEndGame();
				dsLCD->PrintfLine(DriverStationLCD::kUser_Line1, "End Game");
				
				flashCount--;
				
				if (flashCount<=0){
					isFlashing = !isFlashing;
					flashCount=FLASHTIME;
				
				}
				
				
				led0->Set((isFlashing)?Relay::kOn: Relay::kOff);
				led1->Set((isFlashing)?Relay::kOn: Relay::kOff);
			}
//			dsLCD->PrintfLine(DriverStationLCD::kUser_Line6, "Flash: %i", flashCount);
			dsLCD->UpdateLCD();
			Wait(WAIT_TIME); // wait for a motor update time

		}

		GetWatchdog().SetEnabled(false);
	}
开发者ID:2202Programming,项目名称:OldCode,代码行数:49,代码来源:SebastianRobot.cpp

示例15: OperatorControl

	void OperatorControl(void) {
		GetWatchdog().SetEnabled(true);
		dsLCD->Clear();
		dsLCD->UpdateLCD();
		driveControl.initialize();
		pneumaticsControl->initialize();
		shooterControl->initialize();
		while (IsOperatorControl() && IsEnabled()) {
			GetWatchdog().Feed();
			driveControl.run();
			shooterControl->run();
			dsLCD->UpdateLCD();
			Wait(0.005); // wait for a motor update time
		}
		pneumaticsControl->disable();
	}
开发者ID:2202Programming,项目名称:OldCode,代码行数:16,代码来源:Hohenheim.cpp


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