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


C++ CANJaguar::Get方法代码示例

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


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

示例1: TeleopPeriodic

	void TeleopPeriodic()
	{
		SmartDashboard::PutNumber("joystickX",stick.GetX());
		SmartDashboard::PutNumber("joystickY",stick.GetY());
		//SmartDashboard::PutBoolean("fucking buttons", stick.GetRawButton(1));

		//SmartDashboard::PutNumber("potentiometer voltage", pot.GetVoltage());
		SmartDashboard::PutBoolean("infra",infra.Get());

		SmartDashboard::PutNumber("accelX",accel.GetX());
		SmartDashboard::PutNumber("accelY",accel.GetY());
		SmartDashboard::PutNumber("accelZ",accel.GetZ());

		servo.Set(
			trueMap(stick.GetX(), 1, -1, 1, 0) // trueMap allows use of entire joystick
		);
		SmartDashboard::PutNumber("servo", servo.Get());


		jag1.Set(stick.GetY());
		jag2.Set(stick.GetY());
		//tal1.Set(stick.GetY());

		SmartDashboard::PutNumber("jag1", jag1.Get());
		SmartDashboard::PutNumber("jag2", jag2.Get());


		/*SmartDashboard::PutNumber("encpos", enc.Get());
		SmartDashboard::PutNumber("encspd", enc.GetRate());*/

		if (stick.GetRawButton(1) && !actuatePressed) {
			pistonVal=!pistonVal;
			piston.Set(pistonVal ? DoubleSolenoid::kForward : DoubleSolenoid::kReverse);

			actuatePressed = true;
		}
		else if (!stick.GetRawButton(1))
			actuatePressed = false;

		SmartDashboard::PutBoolean("piston forward", piston.Get() == DoubleSolenoid::kForward);


	}
开发者ID:BlueTideRobotics,项目名称:FRC-2016,代码行数:43,代码来源:Robot.cpp

示例2: UpdateDashboardStatus

	void UpdateDashboardStatus()
	{
		Dashboard &dashHigh = m_ds->GetHighPriorityDashboardPacker();
		dashHigh.AddCluster(); // PID (not used for now)
		dashHigh.AddDouble(0.0); // P
		dashHigh.AddDouble(0.0); // I
		dashHigh.AddDouble(0.0); // D
		dashHigh.FinalizeCluster();
		dashHigh.AddDouble(speedJag.GetSpeed()); // Current position
		dashHigh.AddDouble(speedJag.Get()); // Setpoint
		dashHigh.AddDouble(speedJag.GetOutputVoltage()); // Output Voltage
		dashHigh.Finalize();
	}
开发者ID:FRC980,项目名称:FRC-Team-980,代码行数:13,代码来源:MyRobot.cpp


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