From 27e85e442ec08bc511bbf5d5a3d8611b8d9328df Mon Sep 17 00:00:00 2001 From: Mr-Dave Date: Sat, 28 Jan 2023 13:13:26 -0700 Subject: [PATCH] Add params for threshold --- src/sound.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sound.cpp b/src/sound.cpp index 734ae0f3..f90253c5 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -171,6 +171,12 @@ static void snd_load_alerts(ctx_dev *snd) if (mystreq(tmp_params->params_array[indx].param_name,"volume_level")) { tmp_alert.volume_level = atoi(tmp_params->params_array[indx].param_value); } + if (mystreq(tmp_params->params_array[indx].param_name,"trigger_threshold")) { + tmp_alert.trigger_threshold = atoi(tmp_params->params_array[indx].param_value); + } + if (mystreq(tmp_params->params_array[indx].param_name,"trigger_duration")) { + tmp_alert.trigger_duration = atoi(tmp_params->params_array[indx].param_value); + } } vars->snd_alerts.push_back(tmp_alert); util_parms_free(tmp_params);