PowerUp-2018 icon indicating copy to clipboard operation
PowerUp-2018 copied to clipboard

[WIP] Synchronize time with Jetson using UDP

Open snowsignal opened this issue 6 years ago • 6 comments

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.

snowsignal avatar Aug 23 '18 04:08 snowsignal

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!

sertbot[bot] avatar Aug 23 '18 04:08 sertbot[bot]

@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.

snowsignal avatar Aug 23 '18 15:08 snowsignal

I think we'll be fine with 10.25.21.255 (again, value should be set in constants.kt).

andrewda avatar Aug 23 '18 15:08 andrewda

I've also updated time-sync-server to be compatible with these changes.

snowsignal avatar Aug 23 '18 18:08 snowsignal

Should I write tests?

snowsignal avatar Aug 23 '18 18:08 snowsignal

@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 ;).

andrewda avatar Aug 23 '18 18:08 andrewda