fix(test): simplify TEST_CAN ALERT to single-level param like VIOLATION/COLLISION
This commit is contained in:
parent
0d924d139c
commit
fa67a9f225
@ -676,10 +676,8 @@ static void handle_test_cmd(const char *raw)
|
||||
int lv = atoi(cmd + 18);
|
||||
test_can_event("COLLISION", lv, lv ? SPEED_LIMIT_STOP : SPEED_LIMIT_NORMAL);
|
||||
} else if (strncmp(cmd, "TEST_CAN ALERT", 14) == 0) {
|
||||
int ll = 0, rl = 0;
|
||||
sscanf(cmd + 14, " %d %d", &ll, &rl);
|
||||
int active = ll || rl;
|
||||
test_can_event("ALERT", active, active ? SPEED_LIMIT_ALERT : SPEED_LIMIT_NORMAL);
|
||||
int lv = atoi(cmd + 14);
|
||||
test_can_event("ALERT", lv, lv ? SPEED_LIMIT_ALERT : SPEED_LIMIT_NORMAL);
|
||||
} else if (strncmp(cmd, "TEST_BUZZER_ALL", 15) == 0) {
|
||||
if (s_test_all_running) { test_reply("TEST_ERR ALL_ALREADY_RUNNING"); return; }
|
||||
s_test_all_running = 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user