Skip to content

Commit

Permalink
change(esp32): Added clearing of queue with unTone() (#9055)
Browse files Browse the repository at this point in the history
unTone() does not stop until the queue is exhausted. Therefore, we added clearing the queue.
  • Loading branch information
tanakamasayuki authored Jan 8, 2024
1 parent 8a1e463 commit c1a4055
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cores/esp32/Tone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ void noTone(uint8_t pin){
.frequency = 0, // Ignored
.duration = 0, // Ignored
};
xQueueReset(_tone_queue); // clear queue
xQueueSend(_tone_queue, &tone_msg, portMAX_DELAY);
}
}
Expand Down

0 comments on commit c1a4055

Please sign in to comment.