File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
photon-core/src/main/java/org/photonvision/common/hardware/metrics Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 18
18
package org .photonvision .common .hardware .metrics ;
19
19
20
20
import edu .wpi .first .cscore .CameraServerJNI ;
21
+ import edu .wpi .first .networktables .NetworkTable ;
21
22
import edu .wpi .first .networktables .ProtobufPublisher ;
22
23
import java .io .PrintWriter ;
23
24
import java .io .StringWriter ;
@@ -246,7 +247,8 @@ public void publishMetrics() {
246
247
logger .debug ("Publishing Metrics..." );
247
248
248
249
// Check that the hostname hasn't changed
249
- if (!metricPublisher .getTopic ().getName ().equals (CameraServerJNI .getHostname ())) {
250
+ if (!CameraServerJNI .getHostname ()
251
+ .equals (NetworkTable .basenameKey (metricPublisher .getTopic ().getName ()))) {
250
252
logger .warn ("Metrics publisher name does not match hostname! Reinitializing publisher..." );
251
253
metricPublisher .close ();
252
254
metricPublisher =
You can’t perform that action at this time.
0 commit comments