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:

  1. Motor setpoint – target wheel speed applied equally to both motors.

  2. 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, _lineFollowSetPoint shares/queues, and a _save_gains() method.

Yields:

Delegates to multichar_input which yields on every serial poll.