DFMiniMp3 icon indicating copy to clipboard operation
DFMiniMp3 copied to clipboard

Automatically retry to send a command when an expected result isn't received

Open MaximeCheramy opened this issue 4 years ago • 0 comments

This PR improves the reliability of the library by sending a command up to 3 times if an expected result isn't received.

On my DFPlayer module, I've encountered this problem when I receive an event (eg. SD card online) at the exact same time than I query the volume. This is probably a bug in the module itself (the volume is never received).

I also provide a way to reduce the timeout: 10s seems really long, I wanted to test with 2s instead and I thought it could be interesting to let the user decide.

MaximeCheramy avatar Aug 23 '21 19:08 MaximeCheramy