Skip to content

Sync time on raspberry pi before running setup script#3618

Merged
StarrryNight merged 12 commits intoUBC-Thunderbots:masterfrom
StarrryNight:sync_time#3615
Feb 28, 2026
Merged

Sync time on raspberry pi before running setup script#3618
StarrryNight merged 12 commits intoUBC-Thunderbots:masterfrom
StarrryNight:sync_time#3615

Conversation

@StarrryNight
Copy link
Copy Markdown
Contributor

@StarrryNight StarrryNight commented Feb 21, 2026

This PR resolve #3615 . It adds an ansible task to enable ntp before running the setup_pi.yml script to ensure time in synced with local machine.

After enabling ntp, the time on the raspberry pi synced to the local machine. This enabled the setup script to run correctly.
image

Set up pi.
image

Description

Testing Done

Resolved Issues

#3615

Length Justification and Key Files to Review

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

@StarrryNight StarrryNight changed the title Sync time#3615 Sync time on raspberry pi before running setup script Feb 21, 2026
Copy link
Copy Markdown
Contributor

@annieisawesome2 annieisawesome2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Comment thread src/software/embedded/ansible/playbooks/setup_pi.yml Outdated
Comment thread src/software/embedded/ansible/playbooks/setup_pi.yml Outdated
Comment thread src/software/embedded/ansible/tasks/enable_ntp.yml Outdated
@suchirss suchirss requested a review from mkhlb February 22, 2026 01:28
Comment thread src/software/embedded/ansible/tasks/enable_ntp.yml
Comment thread src/software/embedded/ansible/tasks/enable_ntp.yml
Copy link
Copy Markdown
Contributor

@suchirss suchirss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great for the normal case (no tags configured in the command to run setup_pi)! Left notes for a few changes regarding tags, idempotency, and a naming nit.

@StarrryNight
Copy link
Copy Markdown
Contributor Author

Thanks Suchir. I will fix the naming nits and add change the tag to dependencies since its a better fit. And also add the checking ntp block and only enabling if its disbaled.

@StarrryNight StarrryNight self-assigned this Feb 25, 2026
@suchirss
Copy link
Copy Markdown
Contributor

Thanks for applying my requested changes. Your task is now maintains idempotency + correctly applies only the dependencies tag subset.

I ran the following test cases and all of them behaved as expected.
image

The testing also spurred issue #3627

LGTM + nice work!

@StarrryNight StarrryNight merged commit 7f0951e into UBC-Thunderbots:master Feb 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Ansible Task to setup_pi Playbook to sync date on Raspberry Pi with local device

5 participants