mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-01-11 13:21:01 +01:00
Update IO_DFPlayer.h
Fix volume control command.
This commit is contained in:
parent
f3658aaee7
commit
07cc45d861
@ -126,7 +126,7 @@ protected:
|
||||
// If value is zero, it stops playing.
|
||||
// WriteAnalogue on second pin sets the output volume.
|
||||
void _writeAnalogue(VPIN vpin, int value, uint8_t, uint16_t) override {
|
||||
uint8_t pin = _firstVpin - vpin;
|
||||
uint8_t pin = vpin - _firstVpin;
|
||||
switch (pin) {
|
||||
case 0:
|
||||
if (value > 0) {
|
||||
@ -159,13 +159,12 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
bool _isBusy(VPIN vpin) override {
|
||||
(void)vpin; // avoid compiler warning.
|
||||
bool _isBusy(VPIN) override {
|
||||
return _playing;
|
||||
}
|
||||
|
||||
void _display() override {
|
||||
DIAG(F("DFPlayer Configured on Vpins:%d-%d"));
|
||||
DIAG(F("DFPlayer Configured on Vpins:%d-%d"), _firstVpin, _firstVpin+_nPins-1);
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user