mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilib] Fix enableLiveWindowInTest crashing in disabled (#5173)
This commit is contained in:
@@ -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!");
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user