mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-22 01:11:40 +00:00
Update Python rawBytes parsing (#1119)
* data updates to capture multiple rawBytes packets associated with serde updates from late this past month --------- Co-authored-by: Matt <matthew.morley.ca@gmail.com>
This commit is contained in:
@@ -15,14 +15,17 @@ class PhotonPipelineResult:
|
||||
def populateFromPacket(self, packet: Packet) -> Packet:
|
||||
self.targets = []
|
||||
self.latencyMillis = packet.decodeDouble()
|
||||
self.multiTagResult = MultiTargetPNPResult()
|
||||
self.multiTagResult.createFromPacket(packet)
|
||||
targetCount = packet.decode8()
|
||||
|
||||
print(f"targetCount = {targetCount}")
|
||||
for _ in range(targetCount):
|
||||
target = PhotonTrackedTarget()
|
||||
target.createFromPacket(packet)
|
||||
self.targets.append(target)
|
||||
|
||||
self.multiTagResult = MultiTargetPNPResult()
|
||||
self.multiTagResult.createFromPacket(packet)
|
||||
|
||||
return packet
|
||||
|
||||
def setTimestampSeconds(self, timestampSec: float) -> None:
|
||||
|
||||
Reference in New Issue
Block a user