Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wpilibj] Store long preferences as integers #6136

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public static void initBoolean(String key, boolean value) {
*/
public static void setLong(String key, long value) {
NetworkTableEntry entry = m_table.getEntry(key);
entry.setDouble(value);
entry.setInteger(value);
entry.setPersistent();
}

Expand All @@ -242,7 +242,7 @@ public static void setLong(String key, long value) {
*/
public static void initLong(String key, long value) {
NetworkTableEntry entry = m_table.getEntry(key);
entry.setDefaultDouble(value);
entry.setDefaultInteger(value);
entry.setPersistent();
}

Expand Down Expand Up @@ -345,6 +345,6 @@ public static float getFloat(String key, float backup) {
* @return either the value in the table, or the backup
*/
public static long getLong(String key, long backup) {
return (long) m_table.getEntry(key).getDouble(backup);
return m_table.getEntry(key).getInteger(backup);
}
}