Skip to content

Commit

Permalink
fix naming (PhotonVision#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta authored Jan 4, 2024
1 parent cba70d4 commit d85bafa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ public PacketPublisher(RawPublisher publisher, PacketSerde<T> 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
Expand Down

0 comments on commit d85bafa

Please sign in to comment.