Пример #1
0
	void UpdateStatusDisplays(void)
	{		
		// Joystick values
		SmartDashboard::PutNumber("stickX", stick.GetX());
		SmartDashboard::PutNumber("stickY", stick.GetY());
		SmartDashboard::PutBoolean("shift", stick2.GetState(BUTTON_SHIFT) ? kStateClosed : kStateOpen);
		
		// Shooter/Indexer values
		SmartDashboard::PutBoolean("indexSwitch", indexSwitch.GetState() ? kStateClosed : kStateOpen);
		SmartDashboard::PutNumber("shooterMotor", shooterMotor.Get());
		SmartDashboard::PutNumber("indexerMotor", indexerMotor.Get());

		// Misc Motor Values
		SmartDashboard::PutNumber("collectorMotor", collectorMotor.Get());
		SmartDashboard::PutNumber("armMotor", armMotor.Get());

		// Arm position via potentiometer voltage (2.5 volts is center position)
		dsLCD->PrintfLine(DriverStationLCD::kUser_Line3, "Voltage: %3.1f", potentiometer.GetVoltage());
		SmartDashboard::PutNumber("Potentiometer", potentiometer.GetVoltage());
		
		// Claw lock states
		SmartDashboard::PutBoolean("Green Claw State", greenClawLockSwitch.GetState());
		SmartDashboard::PutBoolean("Yellow Claw State", yellowClawLockSwitch.GetState());
		dsLCD->PrintfLine(DriverStationLCD::kUser_Line4, "Green : %s", 
			greenClawLockSwitch.GetState() ? "Locked" : "Unlocked");
		dsLCD->PrintfLine(DriverStationLCD::kUser_Line5, "Yellow: %s", 
			yellowClawLockSwitch.GetState() ? "Locked" : "Unlocked");
		
		// Pneumatic shifter count
		SmartDashboard::PutNumber("Shift Count", m_shiftCount);
		
		// State viariables
		dsLCD->PrintfLine(DriverStationLCD::kUser_Line6, "CMR: %s SMR: %s JTR: %s",
			m_collectorMotorRunning ? "T" : "F",
			m_shooterMotorRunning ? "T" : "F",   
			m_jogTimerRunning ? "T" : "F");
	}