[wpilib] Correct SmartDashboard usage reporting (#6157)

This commit is contained in:
Starlight220
2024-01-05 21:18:29 +02:00
committed by GitHub
parent 106518c3f8
commit 3e40b9e5da
2 changed files with 7 additions and 4 deletions

View File

@@ -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);