fix compiler warnings. fix bug where drive dist was not properly capped.

This commit is contained in:
Thaddeus Hughes
2026-03-12 21:18:32 -05:00
parent cdb3b11db1
commit 77548e7e9f
8 changed files with 14 additions and 20 deletions

View File

@@ -211,8 +211,10 @@ void control_task(void *param) {
continue;
}
this_move_dist = MIN(get_param_value_t(PARAM_DRIVE_DIST).f32, remaining_distance);
goto do_start;
case FSM_CMD_START_IGNORE_OVERTRAVEL:
this_move_dist = get_param_value_t(PARAM_DRIVE_DIST).f32;
do_start:
if (current_state == STATE_IDLE) {
if (get_battery_V() < get_param_value_t(PARAM_LOW_PROTECTION_V).f32) {