diff --git a/src/host_stream/event_recorder.c b/src/host_stream/event_recorder.c index e8339f2..dfe8c00 100644 --- a/src/host_stream/event_recorder.c +++ b/src/host_stream/event_recorder.c @@ -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;