play_folder bugfix and addition of play_mp3 (#4758)

This commit is contained in:
Luis Andrade authored and GitHub committed 2023-05-01 16:01:24 +12:00
1 parent 76b6fcf554
commit c13e20643b
3 files changed
+36 -2

No files matched your search

+2 -2
View File
@@ -7,10 +7,10 @@ namespace dfplayer {
static const char *const TAG = "dfplayer";
void DFPlayer::play_folder(uint16_t folder, uint16_t file) {
if (folder < 100 && file < 256) {
if (folder <= 10 && file <= 1000) {
this->ack_set_is_playing_ = true;
this->send_cmd_(0x0F, (uint8_t) folder, (uint8_t) file);
} else if (folder <= 10 && file <= 1000) {
} else if (folder < 100 && file < 256) {
this->ack_set_is_playing_ = true;
this->send_cmd_(0x14, (((uint16_t) folder) << 12) | file);
} else {