2020-12-26 14:12:05 -08:00
|
|
|
// Copyright (c) FIRST and other WPILib contributors.
|
|
|
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
|
|
|
// the WPILib BSD license file in the root directory of this project.
|
2019-08-25 23:55:59 -04:00
|
|
|
|
|
|
|
|
#include "CommandTestBase.h"
|
|
|
|
|
|
|
|
|
|
using namespace frc2;
|
|
|
|
|
|
|
|
|
|
CommandTestBase::CommandTestBase() {
|
|
|
|
|
auto& scheduler = CommandScheduler::GetInstance();
|
|
|
|
|
scheduler.CancelAll();
|
|
|
|
|
scheduler.Enable();
|
|
|
|
|
scheduler.ClearButtons();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CommandScheduler CommandTestBase::GetScheduler() { return CommandScheduler(); }
|
|
|
|
|
|
2020-09-27 13:27:53 -07:00
|
|
|
void CommandTestBase::SetUp() { frc::sim::DriverStationSim::SetEnabled(true); }
|
2019-08-25 23:55:59 -04:00
|
|
|
|
|
|
|
|
void CommandTestBase::TearDown() {
|
|
|
|
|
CommandScheduler::GetInstance().ClearButtons();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CommandTestBase::SetDSEnabled(bool enabled) {
|
2020-07-15 23:48:09 -07:00
|
|
|
frc::sim::DriverStationSim::SetEnabled(enabled);
|
2019-08-25 23:55:59 -04:00
|
|
|
}
|