feat: motor driver layer — differential drive, steer ramp, estop #19
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-controls/motor-driver"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds
motor_driver.c/has a layer between the balance PID and the raw hoverboard UART driver.balance_cmd→ speed channel,steer_cmd→ steer channel (ready for RC/autonomous yaw input)MOTOR_STEER_RAMP_RATE(20 counts/ms) to prevent yaw torque disturbing balance. Balance PID output is not ramped — it keeps full immediate authority.|speed|+|steer| <= MOTOR_CMD_MAX, ensuring ESC never clips the balance commandBALANCE_TILT_FAULT, clears onBALANCE_DISARMED; zero-send stays in the 50Hz ESC tick to avoid flooding UART at 1kHzmain.c: replaces barehoverboard_send()calls withmotor_driver_update()config.h: addsMOTOR_CMD_MAX=1000,MOTOR_STEER_RAMP_RATE=20Test plan
bal.motor_cmd, steer ramps from 0 when steer_cmd applied🤖 Generated with Claude Code
Reviewed, looks good.