Added Handling for Nack "file not found" (#5338)

This commit is contained in:
croessi 2023-09-04 22:40:46 +02:00 committed by GitHub
parent 4ae582c305
commit 3d9af2a67c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,6 +101,11 @@ void DFPlayer::loop() {
ESP_LOGV(TAG, "Nack");
this->ack_set_is_playing_ = false;
this->ack_reset_is_playing_ = false;
if (argument == 6) {
ESP_LOGV(TAG, "File not found");
this->is_playing_ = false;
}
break;
case 0x41:
ESP_LOGV(TAG, "Ack ok");
this->is_playing_ |= this->ack_set_is_playing_;