-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6dedaa
commit 0e9909b
Showing
444 changed files
with
9,335 additions
and
10,395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 8 additions & 22 deletions
30
api/src/main/java/edu/wpi/first/shuffleboard/api/DashboardMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,39 @@ | ||
package edu.wpi.first.shuffleboard.api; | ||
|
||
import edu.wpi.first.shuffleboard.api.properties.AsyncProperty; | ||
|
||
import javafx.beans.property.ObjectProperty; | ||
import javafx.beans.property.Property; | ||
|
||
/** | ||
* An enum representing the possible modes of dashboard operation. | ||
*/ | ||
/** An enum representing the possible modes of dashboard operation. */ | ||
public enum DashboardMode { | ||
|
||
/** | ||
* Normal operation. No recording or playback is taking place. | ||
*/ | ||
/** Normal operation. No recording or playback is taking place. */ | ||
NORMAL, | ||
|
||
/** | ||
* The dashboard behaves as {@link #NORMAL}, but records all incoming data in the background. | ||
*/ | ||
/** The dashboard behaves as {@link #NORMAL}, but records all incoming data in the background. */ | ||
RECORDING, | ||
|
||
/** | ||
* When in this mode, the dashboard is playing back recorded data. | ||
*/ | ||
/** When in this mode, the dashboard is playing back recorded data. */ | ||
PLAYBACK; | ||
|
||
private static final ObjectProperty<DashboardMode> currentMode | ||
= new AsyncProperty<>(DashboardMode.class, "currentMode", NORMAL); | ||
private static final ObjectProperty<DashboardMode> currentMode = | ||
new AsyncProperty<>(DashboardMode.class, "currentMode", NORMAL); | ||
|
||
public static Property<DashboardMode> currentModeProperty() { | ||
return currentMode; | ||
} | ||
|
||
/** | ||
* Gets the current mode of the dashboard. | ||
*/ | ||
/** Gets the current mode of the dashboard. */ | ||
public static DashboardMode getCurrentMode() { | ||
return currentMode.get(); | ||
} | ||
|
||
/** | ||
* Sets the current mode of the dashboard. | ||
*/ | ||
/** Sets the current mode of the dashboard. */ | ||
public static void setCurrentMode(DashboardMode currentMode) { | ||
DashboardMode.currentMode.set(currentMode); | ||
} | ||
|
||
public static boolean inPlayback() { | ||
return getCurrentMode() == PLAYBACK; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 3 additions & 9 deletions
12
api/src/main/java/edu/wpi/first/shuffleboard/api/TileTitleDisplayMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.