You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
F-28: Every function is momentary under the orchestrator transport #31
Severity: MEDIUM · Effort: Small · Batch: 4 · Status: Code done in #21 (1b8767b), awaiting bench verification
Found in the second full review of the firmware. Recorded with the rest of the pass (F-19…F-44) in docs/REVIEW_REMEDIATION_PLAN_2.md, which is where its status is kept.
Description
The UI sends true on press and false on release. That is right for WiThrottle, where JMRI
applies each function's latching setting. The orchestrator stores FUNCTION_COMMAND.state as
the new absolute state (LayoutService.handleFunctionCommand), so headlights and sound only stay
on while a finger is held down.
Plan
A port capability — press/release events versus absolute state — and a controller method that
toggles from the known state on press for state-style backends and ignores the release.
Files:ThrottleBackend.h, both backends, ThrottleController, MainScreen.cpp, tests
Acceptance Criteria
ThrottleBackend::functionCommandIsButtonEvent(): true for WiThrottle, false for the
orchestrator.
The UI reports the button to ThrottleController::onFunctionButton(), which toggles on
press for a state-style transport and ignores the release.
Unit tests test_controller_function_press_release_for_event_backend, test_controller_function_toggles_for_state_backend and test_orch_backend_function_commands_are_states pass on the board (they compile).
Bench: under the orchestrator, tap F0; the headlight stays on until tapped again.
Activity