Fix PhotonCamera typestring checks (#1480)

Previously NT would quietly drop readQueue changes.
This commit is contained in:
Matt
2024-10-20 22:21:24 -07:00
committed by GitHub
parent 7224561b76
commit 7da2ec1948
7 changed files with 50 additions and 19 deletions

View File

@@ -88,7 +88,9 @@ public class PacketSubscriber<T> implements AutoCloseable {
// TODO - i can see an argument for moving this logic all here instead of keeping in photoncamera
public String getInterfaceUUID() {
return subscriber.getTopic().getProperty("message_uuid");
// ntcore hands us a JSON string with leading/trailing quotes - remove those
var uuidStr = subscriber.getTopic().getProperty("message_uuid");
return uuidStr.replace("\"", "");
}
public List<PacketResult<T>> getAllChanges() {