mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpilib] Correct SmartDashboard usage reporting (#6157)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj.smartdashboard;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tInstances;
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.networktables.NetworkTable;
|
||||
@@ -66,7 +67,7 @@ public final class SmartDashboard {
|
||||
@SuppressWarnings("PMD.CompareObjectsWithEquals")
|
||||
public static synchronized void putData(String key, Sendable data) {
|
||||
if (!m_reported) {
|
||||
HAL.report(tResourceType.kResourceType_SmartDashboard, 0);
|
||||
HAL.report(tResourceType.kResourceType_SmartDashboard, tInstances.kSmartDashboard_Instance);
|
||||
m_reported = true;
|
||||
}
|
||||
Sendable sddata = tablesToData.get(key);
|
||||
@@ -120,7 +121,7 @@ public final class SmartDashboard {
|
||||
*/
|
||||
public static NetworkTableEntry getEntry(String key) {
|
||||
if (!m_reported) {
|
||||
HAL.report(tResourceType.kResourceType_SmartDashboard, 0);
|
||||
HAL.report(tResourceType.kResourceType_SmartDashboard, tInstances.kSmartDashboard_Instance);
|
||||
m_reported = true;
|
||||
}
|
||||
return table.getEntry(key);
|
||||
|
||||
Reference in New Issue
Block a user