PowerUp-2018
PowerUp-2018 copied to clipboard
[WIP] Synchronize time with Jetson using UDP
This is still a work in progress, but I'm making a PR now to get some early feedback on this. This fixes issue #61.
Hi @JacksonCoder, thanks for opening this pull request!
Looks like this is an addition or fix for the robot. To make sure this change goes added in smoothly, make sure the following chores are complete (please check-off items as they are completed):
-
[ ] Test code changes on the robot (if possible).
-
[x] Verify that significant changes have tests and pass successfully.
-
[x] Ensure this pull request is appropriately titled.
Maintainers – please review this PR. A review from the @SouthEugeneRoboticsTeam/reviewers team is required before the PR can be merged.
Finally, use @sertbot merge
to merge this PR into the appropriate branch.
Thanks!
@andrewda, this can already broadcast as well. If we set JETSON_IP
to either the universal broadcast address 255.255.255.255
or the subnet broadcast address (which depends on the IP of the network), the message will be broadcasted across the local network (as long as a router doesn't block it). However, most WiFi routers will block UDP requests, so it's better to set the IP to localhost
for testing.
I think we'll be fine with 10.25.21.255
(again, value should be set in constants.kt).
I've also updated time-sync-server to be compatible with these changes.
Should I write tests?
@JacksonCoder Eh, not necessary for this. And besides we don't really have any tests on this repo. Next year, though... Oh man we're gonna test everything ;).