Skip to content

Conversation

@kcooney
Copy link
Contributor

@kcooney kcooney commented Nov 6, 2025

This introduces PeriodicRegistry, which allows classes to provide callbacks
that are executed periodically, without requiring that users remember to
explicitly call a method during a periodic callback.

Callbacks registered to PeriodicRegistry are provided a RobotState
instance, which can be used to get the state of the robot. RobotState is
an interface, allowing users to provide fake implementations, if necessary,
to enable unit testing.

This PR also introduces ModularSubsystem, which provides an implementation
of PeriodicRegistry. Time spent in the callbacks registered with the PeriodicRegistryowned byModularSubsystem` are attributed to the subsystem.

See #95 and #99 for applications.

@kcooney kcooney force-pushed the kcooney/periodic-registry branch 3 times, most recently from e9a31da to 158fdde Compare November 6, 2025 16:12
@kcooney kcooney force-pushed the kcooney/periodic-registry branch from 158fdde to 0a7ddcc Compare November 15, 2025 01:28
@kcooney kcooney changed the title Add PeriodicRegistry RFC: Add PeriodicRegistry Nov 15, 2025
@kcooney kcooney marked this pull request as ready for review November 15, 2025 02:06
@kcooney kcooney force-pushed the kcooney/periodic-registry branch from 0a7ddcc to c7181ad Compare November 15, 2025 02:12
@kcooney
Copy link
Contributor Author

kcooney commented Dec 30, 2025

@cuttestkittensrule friendly ping

@kcooney kcooney changed the title RFC: Add PeriodicRegistry Add PeriodicRegistry Dec 30, 2025
@kcooney kcooney force-pushed the kcooney/periodic-registry branch 2 times, most recently from 452da57 to 23346c2 Compare January 4, 2026 21:38
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.

2 participants