libstp.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 libstp.ui.screens.wfl.WFLMeasureScreen(port: int, is_on: bool)¶
Bases:
libstp.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() libstp.ui.widgets.Widget¶
Build the screen layout.
Called on every render. Return a Widget tree describing what to display.
- async on_press()¶
- class libstp.ui.screens.wfl.WFLConfirmResult¶
Result from WFLConfirmScreen.
- class libstp.ui.screens.wfl.WFLConfirmScreen(port: int, light_off: float, light_on: float)¶
Bases:
libstp.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() libstp.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 libstp.ui.screens.wfl.WFLDetectScreen¶
Bases:
libstp.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 (WARMING UP / ARMED / GO!). This screen is display-only — no user interaction needed.
- title = 'Wait for Light'¶
- build() libstp.ui.widgets.Widget¶
Build the screen layout.
Called on every render. Return a Widget tree describing what to display.