Skip to content
Snippets Groups Projects
Commit f47443f2 authored by Alessandro Simovic's avatar Alessandro Simovic Committed by Beat Küng
Browse files

libtunes: (bugfix) sending a custom msg tune overrides everything

Custom msg tune can override any tune playing, regardless of the tune_override flag.
parent 2acd431f
No related branches found
No related tags found
No related merge requests found
......@@ -92,10 +92,13 @@ int Tunes::set_control(const tune_control_s &tune_control)
if (tune_control.tune_id < _default_tunes_size) {
switch (tune_control.tune_id) {
case static_cast<int>(TuneID::CUSTOM):
_frequency = (unsigned)tune_control.frequency;
_duration = (unsigned)tune_control.duration;
_silence = (unsigned)tune_control.silence;
_using_custom_msg = true;
if (_tune == nullptr || tune_control.tune_override) {
_frequency = (unsigned)tune_control.frequency;
_duration = (unsigned)tune_control.duration;
_silence = (unsigned)tune_control.silence;
_using_custom_msg = true;
}
break;
// tunes that have a high priority
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment