ui.screens.wfl¶
Wait-for-light screens: calibration (legacy) and auto-detection.
Classes¶
Result from WFLMeasureScreen. |
|
Measure light on or off state for wait-for-light calibration. |
|
Result from WFLConfirmScreen. |
|
Confirm wait-for-light calibration values. |
|
Status display for automatic wait-for-light detection. |
Module Contents¶
- class ui.screens.wfl.WFLMeasureScreen(port: int, is_on: bool)¶
Bases:
ui.screen.UIScreen[WFLMeasureResult]Measure light on or off state for wait-for-light calibration.
Shows light bulb visualization and real-time sensor reading. Returns sensor value when button is pressed.
- title = 'Wait for Light Calibration'¶
- port¶
- is_on¶
- build() ui.widgets.Widget¶
Build the screen layout.
Called on every render. Return a Widget tree describing what to display.
- async on_press()¶
- class ui.screens.wfl.WFLConfirmResult¶
Result from WFLConfirmScreen.
- class ui.screens.wfl.WFLConfirmScreen(port: int, light_off: float, light_on: float)¶
Bases:
ui.screen.UIScreen[WFLConfirmResult]Confirm wait-for-light calibration values.
Shows measured values (editable), threshold, and difference. User can confirm or retry.
- title = 'Wait for Light Calibration'¶
- port¶
- light_off¶
- light_on¶
- build() ui.widgets.Widget¶
Build the screen layout.
Called on every render. Return a Widget tree describing what to display.
- async on_retry()¶
- async on_confirm()¶
- class ui.screens.wfl.WFLDetectScreen¶
Bases:
ui.screen.UIScreen[None]Status display for automatic wait-for-light detection.
Shows the current sensor value, Kalman-filtered baseline, trigger threshold, and detection status. Supports an interactive test mode where the user verifies the lamp would trigger before the system is truly armed.
- States:
WARMING UP — collecting baseline samples TEST MODE — detects lamp but will NOT start the mission TRIGGERED — lamp detected during test (big confirmation) ARMED — fully armed, real trigger starts the mission GO! — lamp detected for real, mission starting
- title = 'Wait for Light'¶
- build() ui.widgets.Widget¶
Build the screen layout.
Called on every render. Return a Widget tree describing what to display.
- async on_test()¶
- async on_reinit()¶