Auto-generate packet dataclasses with Jinja (#1374)

This commit is contained in:
Matt
2024-08-31 13:44:19 -04:00
committed by GitHub
parent c19d54c633
commit 169595e56e
140 changed files with 4445 additions and 2097 deletions

View File

@@ -1,3 +1,25 @@
from time import sleep
from photonlibpy import PhotonCamera
import ntcore
from photonlibpy.photonCamera import setVersionCheckEnabled
def test_roundTrip():
# TODO implement packet encoding, or just kill me
assert True
ntcore.NetworkTableInstance.getDefault().stopServer()
ntcore.NetworkTableInstance.getDefault().setServer("localhost")
ntcore.NetworkTableInstance.getDefault().startClient4("meme")
camera = PhotonCamera("WPI2024")
setVersionCheckEnabled(False)
for i in range(5):
sleep(0.1)
result = camera.getLatestResult()
print(result)
print(camera._rawBytesEntry.getTopic().getProperties())
if __name__ == "__main__":
test_roundTrip()