From d85bafa0eb75211b322c4bdc478df41e274aa8ec Mon Sep 17 00:00:00 2001 From: Sriman Achanta <68172138+srimanachanta@users.noreply.github.com> Date: Thu, 4 Jan 2024 13:20:29 -0500 Subject: [PATCH] fix naming (#1089) --- .../common/dataflow/networktables/NTDataPublisher.java | 2 +- .../java/org/photonvision/simulation/PhotonCameraSim.java | 2 +- .../java/org/photonvision/simulation/SimPhotonCamera.java | 2 +- .../photonvision/common/networktables/PacketPublisher.java | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NTDataPublisher.java b/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NTDataPublisher.java index 87e736d7a2..889875317d 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NTDataPublisher.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NTDataPublisher.java @@ -135,7 +135,7 @@ public void accept(CVPipelineResult result) { TrackedTarget.simpleFromTrackedTargets(result.targets), result.multiTagResult); - ts.resultPublisher.accept(simplified, simplified.getPacketSize()); + ts.resultPublisher.set(simplified, simplified.getPacketSize()); if (ConfigManager.getInstance().getConfig().getNetworkConfig().shouldPublishProto) { ts.protoResultPublisher.set(simplified); } diff --git a/photon-lib/src/main/java/org/photonvision/simulation/PhotonCameraSim.java b/photon-lib/src/main/java/org/photonvision/simulation/PhotonCameraSim.java index a7b3d44ef0..8b6db02314 100644 --- a/photon-lib/src/main/java/org/photonvision/simulation/PhotonCameraSim.java +++ b/photon-lib/src/main/java/org/photonvision/simulation/PhotonCameraSim.java @@ -563,7 +563,7 @@ public void submitProcessedFrame(PhotonPipelineResult result) { public void submitProcessedFrame(PhotonPipelineResult result, long receiveTimestamp) { ts.latencyMillisEntry.set(result.getLatencyMillis(), receiveTimestamp); - ts.resultPublisher.accept(result, result.getPacketSize()); + ts.resultPublisher.set(result, result.getPacketSize()); boolean hasTargets = result.hasTargets(); ts.hasTargetEntry.set(hasTargets, receiveTimestamp); diff --git a/photon-lib/src/main/java/org/photonvision/simulation/SimPhotonCamera.java b/photon-lib/src/main/java/org/photonvision/simulation/SimPhotonCamera.java index 15df48ac90..d6314afd6c 100644 --- a/photon-lib/src/main/java/org/photonvision/simulation/SimPhotonCamera.java +++ b/photon-lib/src/main/java/org/photonvision/simulation/SimPhotonCamera.java @@ -143,7 +143,7 @@ public void submitProcessedFrame( PhotonPipelineResult newResult = new PhotonPipelineResult(latencyMillis, targetList, new MultiTargetPNPResult()); - ts.resultPublisher.accept(newResult, newResult.getPacketSize()); + ts.resultPublisher.set(newResult, newResult.getPacketSize()); boolean hasTargets = newResult.hasTargets(); ts.hasTargetEntry.set(hasTargets); diff --git a/photon-targeting/src/main/java/org/photonvision/common/networktables/PacketPublisher.java b/photon-targeting/src/main/java/org/photonvision/common/networktables/PacketPublisher.java index 135726d899..1a2ffb74b0 100644 --- a/photon-targeting/src/main/java/org/photonvision/common/networktables/PacketPublisher.java +++ b/photon-targeting/src/main/java/org/photonvision/common/networktables/PacketPublisher.java @@ -30,14 +30,14 @@ public PacketPublisher(RawPublisher publisher, PacketSerde serde) { this.serde = serde; } - public void accept(T value, int byteSize) { + public void set(T value, int byteSize) { var packet = new Packet(byteSize); serde.pack(packet, value); publisher.set(packet.getData()); } - public void accept(T value) { - accept(value, serde.getMaxByteSize()); + public void set(T value) { + set(value, serde.getMaxByteSize()); } @Override