mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-22 23:56:13 +01:00
Update IO_DFPlayer.h
Bugfix, volume not working correctly.
This commit is contained in:
parent
3d35e78533
commit
3073061596
|
@ -160,7 +160,7 @@ protected:
|
|||
_requestedSong = -1;
|
||||
_commandSendTime = currentMicros;
|
||||
} else if (_requestedSong == 0) {
|
||||
sendPacket(0x16); // Stop playing
|
||||
sendPacket(0x0e); // Pause playing
|
||||
_requestedSong = -1;
|
||||
_commandSendTime = currentMicros;
|
||||
} else if (_currentVolume < _requestedVolumeLevel) {
|
||||
|
@ -211,8 +211,8 @@ protected:
|
|||
|
||||
if (pin == 0) {
|
||||
// Play track
|
||||
if (value > 0 && volume != 0) {
|
||||
if (volume != 0)
|
||||
if (value > 0) {
|
||||
if (volume > 0)
|
||||
_requestedVolumeLevel = volume;
|
||||
_requestedSong = value;
|
||||
_playing = true;
|
||||
|
@ -222,7 +222,7 @@ protected:
|
|||
}
|
||||
} else if (pin == 1) {
|
||||
// Set volume (0-30)
|
||||
_requestedVolumeLevel = volume;
|
||||
_requestedVolumeLevel = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user