mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-01 02:41:42 +00:00
Adding timeSyncServer for Python (#1675)
This commit is contained in:
@@ -27,6 +27,7 @@ from wpilib import RobotController, Timer
|
||||
|
||||
from .packet import Packet
|
||||
from .targeting.photonPipelineResult import PhotonPipelineResult
|
||||
from .timesync.timeSyncServer import inst
|
||||
from .version import PHOTONLIB_VERSION # type: ignore[import-untyped]
|
||||
|
||||
|
||||
@@ -104,6 +105,9 @@ class PhotonCamera:
|
||||
self._prevHeartbeat = 0
|
||||
self._prevHeartbeatChangeTime = Timer.getFPGATimestamp()
|
||||
|
||||
# Start the time sync server
|
||||
inst.start()
|
||||
|
||||
def getAllUnreadResults(self) -> List[PhotonPipelineResult]:
|
||||
"""
|
||||
The list of pipeline results sent by PhotonVision since the last call to getAllUnreadResults().
|
||||
|
||||
Reference in New Issue
Block a user