libstp.ui.screens.distance ========================== .. py:module:: libstp.ui.screens.distance .. autoapi-nested-parse:: Distance calibration screens. Classes ------- .. autoapisummary:: libstp.ui.screens.distance.DistancePrepareScreen libstp.ui.screens.distance.DistanceDrivingScreen libstp.ui.screens.distance.DistanceMeasureScreen libstp.ui.screens.distance.DistanceConfirmResult libstp.ui.screens.distance.DistanceConfirmScreen Module Contents --------------- .. py:class:: DistancePrepareScreen(requested_distance: float) Bases: :py:obj:`libstp.ui.screen.UIScreen`\ [\ :py:obj:`None`\ ] Prepare screen for distance calibration. Shows robot and target distance. Waits for button press to start. .. py:attribute:: title :value: 'Distance Calibration' .. py:attribute:: requested_distance .. py:method:: build() -> libstp.ui.widgets.Widget Build the screen layout. Called on every render. Return a Widget tree describing what to display. .. py:method:: on_press() :async: .. py:class:: DistanceDrivingScreen(requested_distance: float) Bases: :py:obj:`libstp.ui.screen.UIScreen`\ [\ :py:obj:`None`\ ] Driving animation screen shown while robot moves. This screen should be closed externally when driving completes. .. py:attribute:: title :value: 'Distance Calibration' .. py:attribute:: requested_distance .. py:method:: build() -> libstp.ui.widgets.Widget Build the screen layout. Called on every render. Return a Widget tree describing what to display. .. py:class:: DistanceMeasureScreen(requested_distance: float, default_value: float = None) Bases: :py:obj:`libstp.ui.screen.UIScreen`\ [\ :py:obj:`float`\ ] Measure actual distance traveled. Shows numeric keypad for entering measured distance. .. py:attribute:: title :value: 'Distance Calibration' .. py:attribute:: requested_distance .. py:attribute:: value :value: None .. py:method:: build() -> libstp.ui.widgets.Widget Build the screen layout. Called on every render. Return a Widget tree describing what to display. .. py:method:: on_key(key: str) :async: .. py:method:: on_adjust(value: float) :async: .. py:method:: on_submit() :async: .. py:class:: DistanceConfirmResult Result from DistanceConfirmScreen. .. py:attribute:: confirmed :type: bool .. py:attribute:: scale_factor :type: float .. py:class:: DistanceConfirmScreen(requested: float, measured: float) Bases: :py:obj:`libstp.ui.screen.UIScreen`\ [\ :py:obj:`DistanceConfirmResult`\ ] Confirm distance calibration results. Shows requested, measured, scale factor, and adjustment percentage. .. py:attribute:: title :value: 'Distance Calibration' .. py:attribute:: requested .. py:attribute:: measured .. py:property:: scale_factor :type: float .. py:property:: adjustment :type: float .. py:property:: is_good :type: bool .. py:method:: build() -> libstp.ui.widgets.Widget Build the screen layout. Called on every render. Return a Widget tree describing what to display. .. py:method:: on_apply() :async: .. py:method:: on_retry() :async: