Makuna / DFMiniMp3

Arduino library for the DFPlayer Mini Mp3 module. Please refer to the Wiki for more details. Please use the GitHub Discussions ask questions as the GitHub Issues feature is used for bug tracking.
GNU Lesser General Public License v3.0
146 stars 33 forks source link

Invalid conversion in lib #20

Closed fronbasal closed 5 years ago

fronbasal commented 5 years ago

Hello! I am attempting to run the "random" example, yet it is failing (invalid conversion from 'uint16_t {aka short unsigned int}' to 'DfMp3_PlaybackMode' [-fpermissive]). Here is the full stack trace:

/home/fronbasal/Arduino/libraries/DFPlayer_Mini_Mp3_by_Makuna/src/DFMiniMp3.h: In instantiation of 'DfMp3_PlaybackMode DFMiniMp3<T_SERIAL_METHOD, T_NOTIFICATION_METHOD>::getPlaybackMode() [with T_SERIAL_METHOD = HardwareSerial; T_NOTIFICATION_METHOD = Mp3Notify]':
/home/fronbasal/Desktop/PlayMp3/PlayMp3.ino:81:39:   required from here
/home/fronbasal/Arduino/libraries/DFPlayer_Mini_Mp3_by_Makuna/src/DFMiniMp3.h:184:35: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'DfMp3_PlaybackMode' [-fpermissive]
         return listenForReply(0x45);
                                   ^
exit status 1
Error compiling for board NodeMCU 0.9 (ESP-12 Module).
Makuna commented 5 years ago

https://github.com/Makuna/DFMiniMp3/pull/21

You can use the Github version until I make the next release.

fronbasal commented 5 years ago

Thank you for the quick fix!