libstp.ui.screens.distance

Distance calibration screens.

Classes

DistancePrepareScreen

Prepare screen for distance calibration.

DistanceDrivingScreen

Driving animation screen shown while robot moves.

DistanceMeasureScreen

Measure actual distance traveled.

DistanceConfirmResult

Result from DistanceConfirmScreen.

DistanceConfirmScreen

Confirm distance calibration results.

Module Contents

class libstp.ui.screens.distance.DistancePrepareScreen(requested_distance: float)

Bases: libstp.ui.screen.UIScreen[None]

Prepare screen for distance calibration.

Shows robot and target distance. Waits for button press to start.

title = 'Distance Calibration'
requested_distance
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.distance.DistanceDrivingScreen(requested_distance: float)

Bases: libstp.ui.screen.UIScreen[None]

Driving animation screen shown while robot moves.

This screen should be closed externally when driving completes.

title = 'Distance Calibration'
requested_distance
build() libstp.ui.widgets.Widget

Build the screen layout.

Called on every render. Return a Widget tree describing what to display.

class libstp.ui.screens.distance.DistanceMeasureScreen(requested_distance: float, default_value: float = None)

Bases: libstp.ui.screen.UIScreen[float]

Measure actual distance traveled.

Shows numeric keypad for entering measured distance.

title = 'Distance Calibration'
requested_distance
value = None
build() libstp.ui.widgets.Widget

Build the screen layout.

Called on every render. Return a Widget tree describing what to display.

async on_key(key: str)
async on_adjust(value: float)
async on_submit()
class libstp.ui.screens.distance.DistanceConfirmResult

Result from DistanceConfirmScreen.

confirmed: bool
scale_factor: float
class libstp.ui.screens.distance.DistanceConfirmScreen(requested: float, measured: float)

Bases: libstp.ui.screen.UIScreen[DistanceConfirmResult]

Confirm distance calibration results.

Shows requested, measured, scale factor, and adjustment percentage.

title = 'Distance Calibration'
requested
measured
property scale_factor: float
property adjustment: float
property is_good: bool
build() libstp.ui.widgets.Widget

Build the screen layout.

Called on every render. Return a Widget tree describing what to display.

async on_apply()
async on_retry()