Adds motor_driver.c/h between the balance PID and the raw hoverboard UART driver: - Differential drive: balance_cmd → speed, steer_cmd → steer - Steer-only ramping at MOTOR_STEER_RAMP_RATE (balance PID keeps full immediate authority — no ramp on speed channel) - Headroom clamp: reduces steer so |speed|+|steer|<=MOTOR_CMD_MAX ensuring ESC never clips the balance command - Emergency stop: latches on TILT_FAULT, clears on BALANCE_DISARMED; send path stays in 50Hz ESC tick to avoid flooding UART main.c: replace bare hoverboard_send() with motor_driver_update(); config.h: MOTOR_CMD_MAX=1000, MOTOR_STEER_RAMP_RATE=20 counts/ms Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Description
SaltyLab self-balancing bot firmware (STM32F722)
Languages
Python
67.1%
C
11.4%
JavaScript
9.2%
OpenSCAD
7.8%
HTML
1.5%
Other
2.9%