libstp.step.calibration.deadzone.screens ======================================== .. py:module:: libstp.step.calibration.deadzone.screens .. autoapi-nested-parse:: Deadzone calibration UI screens. These screens guide the user through finding the minimum motor power where the wheel starts turning. Classes ------- .. autoapisummary:: libstp.step.calibration.deadzone.screens.DeadzoneTestResult libstp.step.calibration.deadzone.screens.DeadzoneConfirmResult libstp.step.calibration.deadzone.screens.DeadzoneIntroScreen libstp.step.calibration.deadzone.screens.DeadzoneTestingScreen libstp.step.calibration.deadzone.screens.DeadzoneResultsScreen libstp.step.calibration.deadzone.screens.DeadzoneSummaryScreen Module Contents --------------- .. py:class:: DeadzoneTestResult Result from the testing screen. .. py:attribute:: is_turning :type: bool .. py:class:: DeadzoneConfirmResult Result from the confirmation screen. .. py:attribute:: confirmed :type: bool .. py:attribute:: retry_motor :type: Optional[str] :value: None .. py:class:: DeadzoneIntroScreen(motor_name: str, motor_port: int, direction: str, start_percent: int = 1, max_percent: int = 30) Bases: :py:obj:`libstp.ui.screen.UIScreen`\ [\ :py:obj:`None`\ ] Introduction screen for deadzone calibration. Shows motor info and instructions, waits for button press. .. py:attribute:: title :value: 'Deadzone Calibration' .. py:attribute:: motor_name .. py:attribute:: motor_port .. py:attribute:: direction .. py:attribute:: start_percent :value: 1 .. py:attribute:: max_percent :value: 30 .. 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:: DeadzoneTestingScreen(motor_name: str, motor_port: int, current_percent: int, direction: str, max_percent: int = 30) Bases: :py:obj:`libstp.ui.screen.UIScreen`\ [\ :py:obj:`DeadzoneTestResult`\ ] Screen shown during deadzone testing. Shows current power percentage and direction, with buttons to indicate whether the wheel is turning. .. py:attribute:: title :value: 'Is the wheel turning?' .. py:attribute:: motor_name .. py:attribute:: motor_port .. py:attribute:: current_percent .. py:attribute:: direction .. py:attribute:: max_percent :value: 30 .. 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_turning() :async: .. py:method:: on_not_turning() :async: .. py:method:: on_button() :async: .. py:class:: DeadzoneResultsScreen(motor_name: str, motor_port: int, forward_percent: int, reverse_percent: int, release_percent: int) Bases: :py:obj:`libstp.ui.screen.UIScreen`\ [\ :py:obj:`DeadzoneConfirmResult`\ ] Screen showing calibration results for a single motor. Allows user to confirm or retry the calibration. .. py:attribute:: title :value: 'Calibration Results' .. py:attribute:: motor_name .. py:attribute:: motor_port .. py:attribute:: forward_percent .. py:attribute:: reverse_percent .. py:attribute:: release_percent .. py:property:: start_percent :type: int The higher of forward/reverse as the start threshold. .. py:property:: kS :type: float Normalized static friction coefficient for ff.kS. .. py:property:: is_symmetric :type: bool Check if forward and reverse are roughly equal. .. 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_confirm() :async: .. py:method:: on_retry() :async: .. py:class:: DeadzoneSummaryScreen(results: list) Bases: :py:obj:`libstp.ui.screen.UIScreen`\ [\ :py:obj:`bool`\ ] Summary screen showing results for all motors. Allows user to apply all calibrations or cancel. .. py:attribute:: title :value: 'ff.kS Calibration Summary' .. py:attribute:: results .. 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_cancel() :async: