1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-24 08:36:14 +01:00
Commit Graph

19 Commits

Author SHA1 Message Date
Neil McKechnie
1b4faa92cd Update IO_DFPlayer.h
Reinstate STOP command in place of PAUSE, as PAUSE was being reported differently to STOP in the status response.
2023-03-31 17:58:30 +01:00
Neil McKechnie
6fbaca7930 Update IO_DFPlayer.h
Ensure device goes off-line when not responding.
2023-03-31 16:50:18 +01:00
Neil McKechnie
6b535654f8 DFplayer driver now polls device to detect failures and errors.
Add cyclic (1-second) poll of DFplayer device to detect if it goes unresponsive.
2023-03-31 16:40:40 +01:00
Neil McKechnie
86c3020672 Correct display of high VPIN numbers in diagnostic output.
No functional change.
VPINs are unsigned integers in the range 0-65535 (although the highest values are special, 65535=VPIN_NONE).  Values above 32767 were erroneously being displayed as negative.  This has been fixed, which is a pre-requisite for allowing VPINs above 32767 to be used.
2023-03-27 13:08:14 +01:00
Neil McKechnie
3073061596 Update IO_DFPlayer.h
Bugfix, volume not working correctly.
2023-03-15 18:10:27 +00:00
Neil McKechnie
325d4bce73 Update IO_DFPlayer.h
Rework delay between command: instead of sending null characters, which doesn't work on some chip sets, send commands from the _loop() function with a 100ms delay between consecutive commands.
2023-03-15 09:20:42 +00:00
Neil McKechnie
6f5680fce0 DFPlayer: Avoid jumps in volume when switching song and reducing volume at the same time. 2023-02-04 20:59:19 +00:00
Neil McKechnie
7c25f22939 Fix error reported in IO_DFPlayer.h when compiling for some platforms 2023-01-14 23:50:33 +00:00
Neil McKechnie
70203c3733 Fix to IO_DFPlayer.h - device was ignoring commands
The DFPlayer device does not like successive commands arriving to quickly after one another and may ignore a command.  The driver has been modified to enforce a delay between commands by sending pad characters where necessary.
2022-11-22 17:15:13 +00:00
Harald Barth
f56a9a2c43 compiler warning fixes and stupid cast for ESP toolchain 2022-10-20 00:53:05 +02:00
Asbelos
ef937dcacf Privatize HAL constructors
Forces caller to go via create function which includes overlap checks before class is instantiated.
2022-06-14 15:23:27 +01:00
Asbelos
e11d2d08d1 HAL catch pin overlaps 2022-06-14 15:15:42 +01:00
Neil McKechnie
e59e07b971 Improved HAL diagnostics
Looptime diagnostic enhanced, and duplicated diagnostic messages removed from DFPlayer class.
2021-09-21 13:43:52 +01:00
Neil McKechnie
302b16547e HAL driver enhancements
Performance enhancements in IODevice::loop() function.
Improved error handling, device is placed off line if not responding.
Improved error reporting, device shown as offline if not operational (faulty or not present).
2021-09-21 11:02:23 +01:00
Neil McKechnie
fa650673eb DFPlayer: allow volume to be set in play command. 2021-09-17 12:31:28 +01:00
Neil McKechnie
ad7cd5f401 Remove virtual _isBusy() function in favor of _read().
When writing to analogue outputs pins, the digital _read() function now returns the 'busy' status of the analogue pin.  Consequently, the _isBusy() function becomes superfluous and has been removed.  The static IODevice::isBusy() function now calls the object's _read() function instead.
Also, limit in DFPlayer of 3 pins has been removed.
2021-09-17 11:36:08 +01:00
Neil McKechnie
07cc45d861 Update IO_DFPlayer.h
Fix volume control command.
2021-09-16 12:39:51 +01:00
Neil McKechnie
3dc0b1619c Update IO_DFPlayer.h 2021-09-15 21:37:38 +01:00
Neil McKechnie
02a715d54d New DFPlayer MP3 device, and tidy comments in other drivers. 2021-09-15 00:23:24 +01:00