[wpilib] Fix enableLiveWindowInTest crashing in disabled (#5173)

This commit is contained in:
Ryan Blue
2023-03-10 22:24:40 -05:00
committed by GitHub
parent 32ec5b3f75
commit 0d22cf5ff7
2 changed files with 2 additions and 2 deletions

View File

@@ -95,7 +95,7 @@ void IterativeRobotBase::SetNetworkTablesFlushEnabled(bool enabled) {
}
void IterativeRobotBase::EnableLiveWindowInTest(bool testLW) {
if (IsTest()) {
if (IsTestEnabled()) {
throw FRC_MakeError(err::IncompatibleMode,
"Can't configure test mode while in test mode!");
}

View File

@@ -253,7 +253,7 @@ public abstract class IterativeRobotBase extends RobotBase {
* @throws ConcurrentModificationException if this is called during test mode.
*/
public void enableLiveWindowInTest(boolean testLW) {
if (isTest()) {
if (isTestEnabled()) {
throw new ConcurrentModificationException("Can't configure test mode while in test mode!");
}
m_lwEnabledInTest = testLW;