You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, since the new library version 1.0.6 , arduino stuck into an infinite loop when we play a music and we try to stop it.
The issue can be reproduced if the ack mode is set to true, then you play a music, and then you stop it with the DFPlayer function
The issue come from a change on the sendStack and available function.
it seams when you sendStack Stop (command 0x16) DFplayer do not reply or there is no catch in switch case in the available() function and _isSending is never set to false as the handleError is not called anymore, and you are stuck in the while loop in the sendStack function.
void DFRobotDFPlayerMini::sendStack(){ if (_sending[Stack_ACK]) { //if the ack mode is on wait until the last transmition **while (_isSending) { delay(0); waitAvailable(); }** }
the romoval of the following code in DFRobotDFPlayerMini::available(){ function is responsible of the DFplayer stuck : if (_isSending && (millis()-_timeOutTimer>=_timeOutDuration)) { return handleError(TimeOut); }
This need to checked back and be fixed as the dfplayer is no more really usable.
The text was updated successfully, but these errors were encountered:
There are many problems with this library. For example, when you use readVolume after playing a piece of music, the value read out will definitely be incorrect.
Even if it is currently operating normally, problems with reading values will occur after the program has been running for a period of time.
Hello, since the new library version 1.0.6 , arduino stuck into an infinite loop when we play a music and we try to stop it.
The issue can be reproduced if the ack mode is set to true, then you play a music, and then you stop it with the DFPlayer function
The issue come from a change on the sendStack and available function.
it seams when you sendStack Stop (command 0x16) DFplayer do not reply or there is no catch in switch case in the available() function and _isSending is never set to false as the handleError is not called anymore, and you are stuck in the while loop in the sendStack function.
void DFRobotDFPlayerMini::sendStack(){ if (_sending[Stack_ACK]) { //if the ack mode is on wait until the last transmition **while (_isSending) { delay(0); waitAvailable(); }** }
the romoval of the following code in DFRobotDFPlayerMini::available(){ function is responsible of the DFplayer stuck :
if (_isSending && (millis()-_timeOutTimer>=_timeOutDuration)) { return handleError(TimeOut); }
This need to checked back and be fixed as the dfplayer is no more really usable.
The text was updated successfully, but these errors were encountered: