From 9471098464c3f2631f7c513a4502b3d7af05ed3b Mon Sep 17 00:00:00 2001 From: Sriman Achanta <68172138+srimanachanta@users.noreply.github.com> Date: Fri, 29 Dec 2023 19:00:08 -0500 Subject: [PATCH] fix naming --- .../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 0f668a417c..96da4c12ba 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 @@ -134,7 +134,7 @@ public void accept(CVPipelineResult result) { TrackedTarget.simpleFromTrackedTargets(result.targets), result.multiTagResult); - ts.resultPublisher.accept(simplified, simplified.getPacketSize()); + ts.resultPublisher.set(simplified, simplified.getPacketSize()); ts.pipelineIndexPublisher.set(pipelineIndexSupplier.get()); ts.driverModePublisher.set(driverModeSupplier.getAsBoolean()); 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 e3efe971ca..f7881e1f98 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