mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +01:00
DFPlayer: refix Bug created with PR 4758 (#5861)
This commit is contained in:
parent
13736b5c57
commit
90f416bd0d
1 changed files with 2 additions and 2 deletions
|
@ -7,10 +7,10 @@ namespace dfplayer {
|
|||
static const char *const TAG = "dfplayer";
|
||||
|
||||
void DFPlayer::play_folder(uint16_t folder, uint16_t file) {
|
||||
if (folder <= 10 && file <= 1000) {
|
||||
if (folder < 100 && file < 256) {
|
||||
this->ack_set_is_playing_ = true;
|
||||
this->send_cmd_(0x0F, (uint8_t) folder, (uint8_t) file);
|
||||
} else if (folder < 100 && file < 256) {
|
||||
} else if (folder <= 15 && file <= 3000) {
|
||||
this->ack_set_is_playing_ = true;
|
||||
this->send_cmd_(0x14, (((uint16_t) folder) << 12) | file);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue