Skip to content

Commit

Permalink
audio: fix session timer
Browse files Browse the repository at this point in the history
In commit 349a8e4 ("treewide: define display timeout in seconds"),
we changed reset_timer to convert the timeout to microseconds inside the
function, but we forgot to change the reset_timer call for the session
timer. As a result, the session timer was waiting for millions of
seconds rather than just the number of seconds in the config.

Fixes: 349a8e4 ("treewide: define display timeout in seconds")
  • Loading branch information
stintel authored and kristiankielhofner committed Nov 22, 2023
1 parent 167dcf2 commit dd2815b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,7 @@ static esp_err_t cb_ar_event(audio_rec_evt_t *are, void *data)
speech_rec_mode = config_get_char("speech_rec_mode", DEFAULT_SPEECH_REC_MODE);

if (strcmp(speech_rec_mode, "WIS") == 0) {
reset_timer(hdl_sess_timer, config_get_int("stream_timeout", DEFAULT_STREAM_TIMEOUT) * 1000 * 1000,
false);
reset_timer(hdl_sess_timer, config_get_int("stream_timeout", DEFAULT_STREAM_TIMEOUT), false);
}
if (lvgl_port_lock(lvgl_lock_timeout)) {
lv_obj_add_flag(lbl_ln1, LV_OBJ_FLAG_HIDDEN);
Expand Down

0 comments on commit dd2815b

Please sign in to comment.