Skip to content

Commit c1a4055

Browse files
change(esp32): Added clearing of queue with unTone() (#9055)
unTone() does not stop until the queue is exhausted. Therefore, we added clearing the queue.
1 parent 8a1e463 commit c1a4055

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: cores/esp32/Tone.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ void noTone(uint8_t pin){
9595
.frequency = 0, // Ignored
9696
.duration = 0, // Ignored
9797
};
98+
xQueueReset(_tone_queue); // clear queue
9899
xQueueSend(_tone_queue, &tone_msg, portMAX_DELAY);
99100
}
100101
}

0 commit comments

Comments
 (0)