mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[hal,wpilib] Rename DriverStation constants to all caps
This commit is contained in:
@@ -19,7 +19,7 @@ class POVButtonTest : public CommandTestBase {};
|
||||
|
||||
TEST_F(POVButtonTest, SetPOV) {
|
||||
wpi::sim::JoystickSim joysim(1);
|
||||
joysim.SetPOV(wpi::DriverStation::kUp);
|
||||
joysim.SetPOV(wpi::DriverStation::POVDirection::UP);
|
||||
joysim.NotifyNewData();
|
||||
|
||||
auto& scheduler = CommandScheduler::GetInstance();
|
||||
@@ -28,11 +28,11 @@ TEST_F(POVButtonTest, SetPOV) {
|
||||
WaitUntilCommand command([&finished] { return finished; });
|
||||
|
||||
wpi::Joystick joy(1);
|
||||
POVButton(&joy, wpi::DriverStation::kRight).OnTrue(&command);
|
||||
POVButton(&joy, wpi::DriverStation::POVDirection::RIGHT).OnTrue(&command);
|
||||
scheduler.Run();
|
||||
EXPECT_FALSE(scheduler.IsScheduled(&command));
|
||||
|
||||
joysim.SetPOV(wpi::DriverStation::kRight);
|
||||
joysim.SetPOV(wpi::DriverStation::POVDirection::RIGHT);
|
||||
joysim.NotifyNewData();
|
||||
|
||||
scheduler.Run();
|
||||
|
||||
@@ -16,7 +16,7 @@ class RobotModeTriggersTest : public CommandTestBase {};
|
||||
|
||||
TEST(RobotModeTriggersTest, Autonomous) {
|
||||
DriverStationSim::ResetData();
|
||||
DriverStationSim::SetRobotMode(HAL_ROBOTMODE_AUTONOMOUS);
|
||||
DriverStationSim::SetRobotMode(HAL_ROBOT_MODE_AUTONOMOUS);
|
||||
DriverStationSim::SetEnabled(true);
|
||||
DriverStationSim::NotifyNewData();
|
||||
Trigger autonomous = RobotModeTriggers::Autonomous();
|
||||
@@ -25,7 +25,7 @@ TEST(RobotModeTriggersTest, Autonomous) {
|
||||
|
||||
TEST(RobotModeTriggersTest, Teleop) {
|
||||
DriverStationSim::ResetData();
|
||||
DriverStationSim::SetRobotMode(HAL_ROBOTMODE_TELEOPERATED);
|
||||
DriverStationSim::SetRobotMode(HAL_ROBOT_MODE_TELEOPERATED);
|
||||
DriverStationSim::SetEnabled(true);
|
||||
DriverStationSim::NotifyNewData();
|
||||
Trigger teleop = RobotModeTriggers::Teleop();
|
||||
@@ -42,7 +42,7 @@ TEST(RobotModeTriggersTest, Disabled) {
|
||||
|
||||
TEST(RobotModeTriggersTest, TestMode) {
|
||||
DriverStationSim::ResetData();
|
||||
DriverStationSim::SetRobotMode(HAL_ROBOTMODE_TEST);
|
||||
DriverStationSim::SetRobotMode(HAL_ROBOT_MODE_TEST);
|
||||
DriverStationSim::SetEnabled(true);
|
||||
DriverStationSim::NotifyNewData();
|
||||
Trigger test = RobotModeTriggers::Test();
|
||||
|
||||
Reference in New Issue
Block a user