Add configurable step size selector and motor velocity controls

F2 Control screen Manual mode now has a row of step-size buttons
(0.1°, 0.5°, 1°, 5°, 10°) that scale arrow key nudges, plus
AZ/EL velocity inputs with Apply button for runtime motor speed
tuning via firmware mv/ma commands.

Bridge: set_max_velocity(), set_max_acceleration() write methods.
Demo: mutable dynamics + console mv/ma write handling.
Tests: 8 Textual pilot tests covering button toggle, nudge math,
velocity population, and apply round-trip.
This commit is contained in:
Ryan Malloy 2026-02-14 20:05:12 -07:00
parent 5252d1d73c
commit ce24f7c478
5 changed files with 506 additions and 12 deletions

View file

@ -315,6 +315,21 @@ class SerialBridge:
return result
def set_max_velocity(self, motor_id: int, deg_per_sec: float) -> None:
"""Set max velocity for a motor axis (°/s). Firmware: MOT> mv [motor] [vel]."""
with self._lock:
self._ensure_menu(Menu.MOT)
self._send(f"mv {motor_id} {deg_per_sec:.1f}")
def set_max_acceleration(self, motor_id: int, accel: float) -> None:
"""Set max acceleration for a motor axis.
Firmware: MOT> ma [motor] [accel] (°/).
"""
with self._lock:
self._ensure_menu(Menu.MOT)
self._send(f"ma {motor_id} {accel:.1f}")
def get_motor_life(self) -> str:
"""Read motor lifetime / usage statistics."""
with self._lock: