ui.ui_setpoint module¶
Motor and line-follower setpoint configuration screen for the Romi robot UI.
Prompts the user to enter two setpoint values via the serial terminal:
Motor setpoint – target wheel speed applied equally to both motors.
Line-follower (LF) setpoint – the reference value used by the line-following proportional controller.
Changes are persisted to non-volatile storage via ui._save_gains() so
the setpoints are restored on the next power-up.
- ui.ui_setpoint.run(ui)[source]¶
Generator that prompts for and applies motor and LF setpoints.
Displays the current value of each setpoint, accepts a new float via
multichar_input, and writes the result to the appropriate shared variable. If the user presses Enter without typing a value the existing setpoint is left unchanged.- Args:
- ui: UI context object exposing
_ser,_leftMotorSetPoint, _rightMotorSetPoint,_lineFollowSetPointshares/queues, and a_save_gains()method.
- ui: UI context object exposing
- Yields:
Delegates to
multichar_inputwhich yields on every serial poll.