Split the two command implementations into separate libraries (#2012)

This will allow us at the user code side to determine to include old commands, new commands or both.
This commit is contained in:
Thad House
2019-11-01 21:58:54 -07:00
committed by Peter Johnson
parent 2ad15cae19
commit 509819d83f
271 changed files with 470 additions and 91 deletions

View File

@@ -11,7 +11,6 @@ import edu.wpi.first.networktables.NetworkTable;
import edu.wpi.first.networktables.NetworkTableEntry;
import edu.wpi.first.networktables.NetworkTableInstance;
import edu.wpi.first.wpilibj.Sendable;
import edu.wpi.first.wpilibj.command.Scheduler;
import edu.wpi.first.wpilibj.smartdashboard.SendableRegistry;
@@ -64,17 +63,13 @@ public class LiveWindow {
startLiveWindow = enabled;
liveWindowEnabled = enabled;
updateValues(); // Force table generation now to make sure everything is defined
Scheduler scheduler = Scheduler.getInstance();
if (enabled) {
System.out.println("Starting live window mode.");
scheduler.disable();
scheduler.removeAll();
} else {
System.out.println("stopping live window mode.");
SendableRegistry.foreachLiveWindow(dataHandle, cbdata -> {
cbdata.builder.stopLiveWindowMode();
});
scheduler.enable();
}
enabledEntry.setBoolean(enabled);
}