mirror of
https://github.com/esphome/esphome.git
synced 2025-01-14 00:23:18 +01:00
make sure that only the component locking is in place.
This commit is contained in:
parent
70a0d0a54b
commit
7361247c1b
1 changed files with 2 additions and 3 deletions
|
@ -242,9 +242,8 @@ void I2SAudioSpeaker::speaker_task(void *params) {
|
|||
pdFALSE, // Don't wait for all the bits,
|
||||
portMAX_DELAY); // Block indefinitely until a bit is set
|
||||
|
||||
if (event_group_bits & (SpeakerEventGroupBits::COMMAND_STOP |
|
||||
SpeakerEventGroupBits::COMMAND_STOP_GRACEFULLY)) { // Received a stop signal before the task
|
||||
// was requested to start
|
||||
if (event_group_bits & (SpeakerEventGroupBits::COMMAND_STOP | SpeakerEventGroupBits::COMMAND_STOP_GRACEFULLY)) {
|
||||
// Received a stop signal before the task was requested to start
|
||||
this_speaker->delete_task_(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue