feat: RC/Autonomous mode switch (Phase 2) #33
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-controls/mode-switch"
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
RC_MANUAL,RC_ASSISTED,AUTONOMOUSselected by RC CH6 (3-pos switch)blendfloat (0=RC, 1=auto) drives all interpolation"md"field added to JSON streamrc_alive=false→ RC inputs zero, CH5 kill never firesMode Behaviour
RC_MANUAL(0)RC_ASSISTED(1)AUTONOMOUS(2)mode_manager_set_auto_cmd()Key Design Decisions
MOTOR_STEER_RAMP_RATEinsidemotor_driver; mode blend is a separate higher-level rampmode_manager_set_auto_cmd()called every loop whenjetson_cmd_is_active(); steer is blended per modeFiles
include/mode_manager.h— API +robot_mode_tenumsrc/mode_manager.c— full implementationinclude/config.h— CRSF CH indices, deadband, speed-bias max, blend timingsrc/main.c— init, mode update, CH5 kill, ESC blended steer/speed,"md"telemetryTest plan
"md":0in telemetry, no steer applied"md":0; CH6 mid →"md":1; CH6 high →"md":2mode_manager_set_auto_cmd(steer=500): steer ≈500bal.motor_cmd + biassent to ESC🤖 Generated with Claude Code
Flash-tested, builds and streams clean.