Skip to content

[wpilib] Rename mode Init functions to Enter#8719

Open
calcmogul wants to merge 1 commit intowpilibsuite:2027from
calcmogul:wpilib-rename-mode-init-functions-to-enter
Open

[wpilib] Rename mode Init functions to Enter#8719
calcmogul wants to merge 1 commit intowpilibsuite:2027from
calcmogul:wpilib-rename-mode-init-functions-to-enter

Conversation

@calcmogul
Copy link
Copy Markdown
Member

Fixes #8717.

@calcmogul calcmogul requested review from a team as code owners April 3, 2026 00:49
@calcmogul calcmogul force-pushed the wpilib-rename-mode-init-functions-to-enter branch 3 times, most recently from f6c5717 to d16260a Compare April 3, 2026 01:32
Copy link
Copy Markdown
Member

@auscompgeek auscompgeek left a comment

Choose a reason for hiding this comment

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

//robotpyExamples need updating too.

@calcmogul calcmogul force-pushed the wpilib-rename-mode-init-functions-to-enter branch from d16260a to 922d795 Compare April 3, 2026 01:38
Comment thread wpimath/src/test/java/org/wpilib/math/geometry/QuaternionTest.java Outdated
@calcmogul calcmogul force-pushed the wpilib-rename-mode-init-functions-to-enter branch from 922d795 to a0bd4b7 Compare April 3, 2026 01:41
@github-actions github-actions bot removed the component: wpimath Math library label Apr 3, 2026
PeterJohnson pushed a commit that referenced this pull request Apr 10, 2026
1. Make the OpMode interface itself periodic; this means the only
differences between `OpMode` and `PeriodicOpMode` are the latter's
methods to add sideloaded periodic callbacks
2. Make OpModeRobot process callbacks in a similar fashion to TimedRobot
and
3. Add some lifecycle functions (discussed below)
4. Pull the callback priority queue from TimedRobot to a new class
called `PeriodicPriorityQueue` so that `TimedRobot` and `OpModeRobot`
have less duplication
5. Fix a typo in the DriverStationJNI class that causes a memory leak
when certain driver station sim calls
6. Port the C++ OpModeRobot tests to Java 

`OpModeRobot` now possesses some `IterativeRobotBase`-stye lifecycle
functions; these functions
1. `robotPeriodic` 
2. `simulationInit` and `simulationPeriodic` 
3. `disabledInit`, `disabledPeriodic`, and `disabledExit`
(note that `simulationInit` and `disabledInit` may be renamed to match
#8719)

`OpModeRobot` also now processes `OpMode` changes (by the Driver
Station) in its `loopFunc` method, similar to
`IterativeRobotBase.loopFunc` processing game mode changes; `loopFunc`
is, similarly to `TimedRobot`, provided as a default `Callback`

---------

Signed-off-by: Zach Harel <zach@zharel.me>
Co-authored-by: Joseph Eng <91924258+KangarooKoala@users.noreply.github.com>
@calcmogul calcmogul force-pushed the wpilib-rename-mode-init-functions-to-enter branch 3 times, most recently from 2cfcfea to cc78f72 Compare April 10, 2026 21:03
@calcmogul calcmogul force-pushed the wpilib-rename-mode-init-functions-to-enter branch from cc78f72 to 3fd2377 Compare April 10, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants