Skip to content

Commit

Permalink
update photon-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta committed Nov 6, 2023
1 parent 29818c4 commit e58effe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions photon-lib/src/main/java/org/photonvision/PhotonCamera.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ public PhotonCamera(NetworkTableInstance instance, String cameraName) {
path = cameraTable.getPath();
rawBytesEntry =
cameraTable
.getRawTopic("rawBytes")
.getRawTopic("result_proto")
.subscribe(
"rawBytes", new byte[] {}, PubSubOption.periodic(0.01), PubSubOption.sendAll(true));
"proto:" + PhotonPipelineResult.proto.getDescriptor().getFullName(), new byte[] {}, PubSubOption.periodic(0.01), PubSubOption.sendAll(true));
driverModePublisher = cameraTable.getBooleanTopic("driverModeRequest").publish();
driverModeSubscriber = cameraTable.getBooleanTopic("driverMode").subscribe(false);
inputSaveImgEntry = cameraTable.getIntegerTopic("inputSaveImgCmd").getEntry(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,7 @@ public void submitProcessedFrame(PhotonPipelineResult result) {
public void submitProcessedFrame(PhotonPipelineResult result, long receiveTimestamp) {
ts.latencyMillisEntry.set(result.getLatencyMillis(), receiveTimestamp);

var newPacket = new Packet(result.getPacketSize());
result.populatePacket(newPacket);
ts.rawBytesEntry.set(newPacket.getData(), receiveTimestamp);
ts.rawBytesEntry.set(result, receiveTimestamp);

boolean hasTargets = result.hasTargets();
ts.hasTargetEntry.set(hasTargets, receiveTimestamp);
Expand Down

0 comments on commit e58effe

Please sign in to comment.