Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta committed Dec 14, 2023
1 parent f4f29f0 commit 55caaf3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/frc/robot/util/LoggedTunableNumber.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public LoggedTunableNumber(String dashboardKey, double defaultValue) {
* Set the default value of the number. The default value can only be set once.
*
* @param defaultValue The default value
* @throws IllegalStateException If a default value has already been set either by the constructor
* or by a previous call to this method.
*/
public void initDefault(double defaultValue) {
if (this.defaultValue != null) {
Expand All @@ -61,6 +63,7 @@ public void initDefault(double defaultValue) {
* Get the current value, from dashboard if available and in tuning mode.
*
* @return The current value
* @throws IllegalStateException If a default value hasn't been set yet.
*/
public double get() {
if (defaultValue == null) {
Expand Down

0 comments on commit 55caaf3

Please sign in to comment.