mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
43 lines
727 B
C++
43 lines
727 B
C++
#include "RobotState.h"
|
|
|
|
RobotStateInterface* RobotState::impl = 0;
|
|
|
|
void RobotState::SetImplementation(RobotStateInterface* i) {
|
|
impl = i;
|
|
}
|
|
|
|
bool RobotState::IsDisabled() {
|
|
if (impl != 0) {
|
|
return impl->IsDisabled();
|
|
}
|
|
return true;
|
|
}
|
|
|
|
bool RobotState::IsEnabled() {
|
|
if (impl != 0) {
|
|
return impl->IsEnabled();
|
|
}
|
|
return false;
|
|
}
|
|
|
|
bool RobotState::IsOperatorControl() {
|
|
if (impl != 0) {
|
|
return impl->IsOperatorControl();
|
|
}
|
|
return true;
|
|
}
|
|
|
|
bool RobotState::IsAutonomous() {
|
|
if (impl != 0) {
|
|
return impl->IsAutonomous();
|
|
}
|
|
return false;
|
|
}
|
|
|
|
bool RobotState::IsTest() {
|
|
if (impl != 0) {
|
|
return impl->IsTest();
|
|
}
|
|
return false;
|
|
}
|