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