1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-25 21:41:23 +01:00
Commit Graph

1281 Commits

Author SHA1 Message Date
Neil McKechnie
4f16a4ca06 Fix GPIO Expander initial output state.
Previously, pullups were enabled on GPIO Expander digital pins by default, even if the pin was only ever used as an output.  This could lead to a spurious HIGH state being seen by external equipment before the output is initialised to LOW.  To avoid this, the pin pullup is now not enabled until a configure or read operation is issued for the pin.
2021-10-15 18:44:51 +01:00
Neil McKechnie
9097a62f42 Add new <D ANIN vpin> and <D ANOUT vpin value> commands.
Alias for existing <D SERVO ...> command added as <D ANOUT ...> (since not all analogue outputs are servos).  Also, <D ANIN vpin> added to display the value of an analogue input pin.
2021-10-08 13:30:23 +01:00
Neil McKechnie
80472a76dc I2CManager - support slower I2C speeds.
Previously the driver allowed speeds down to 32kHz but lower speeds were not implemented correctly.
2021-10-08 13:28:43 +01:00
Harald Barth
26bd3ac342 Example ESP motor shields 2021-10-05 21:55:13 +02:00
Harald Barth
d174c05127 Wifi connect and waveform 2021-10-05 21:53:02 +02:00
Neil McKechnie
6dde811279 Optimise HAL drivers for TOF sensor and Analogue Inputs
Increased use of async I2C in HAL drivers to reduce overall loop time overhead.
2021-10-05 12:48:45 +01:00
Harald Barth
75dffd9dfa first ESP32 compile 2021-10-05 10:39:08 +02:00
Harald Barth
0a10dbea0b not forget volatile 2021-10-04 23:12:47 +02:00
Harald Barth
43191e225e first stab at ESP32 2021-10-04 23:03:36 +02:00
Harald Barth
50bb1c950b less warnings 2021-10-03 19:58:05 +02:00
Neil McKechnie
7aed7de6cd Change default LCD address.
LCD Backpack Address in example config.h changed to 0x27 (to match the most commonly available PCF8574 device).
2021-10-03 12:24:14 +01:00
Asbelos
bfc2b75eb5 SERIAL2 Typo 2021-10-01 11:01:32 +01:00
Harald Barth
0bb6b577fa Wifi STA or AP mode 2021-10-01 11:32:09 +02:00
Harald Barth
cf0c818138 Cleanup ESP specific details 2021-10-01 09:09:30 +02:00
Harald Barth
426b27f0dd Reworked use of ringbuffer 2021-09-30 22:55:14 +02:00
Harald Barth
19b4893b5f counter should be int, not uint8_t 2021-09-28 21:08:41 +02:00
Harald Barth
1c7a5320d8 more send diag 2021-09-28 17:31:12 +02:00
Harald Barth
afd4626988 send diag 2021-09-28 17:20:44 +02:00
Harald Barth
a194b8965c Ack read outside interrupt 2021-09-27 20:01:46 +02:00
Harald Barth
696d12fc5e test A0 2021-09-26 11:57:15 +02:00
Harald Barth
35cba02ee7 outboundRing uses sendData 2021-09-26 10:59:07 +02:00
Harald Barth
fa1d1619b6 wifi sendData 2021-09-26 08:37:59 +02:00
Harald Barth
b048879eaa Wifi active 2021-09-25 23:18:10 +02:00
Neil McKechnie
9fc805831d HAL: Minor optimisations
Remove virtual method hasCallback().
Optimise findDevice() method (used by read, write etc.).
Simplify Sensor handling with regard to IO Devices that support callbacks.
2021-09-23 10:54:27 +01:00
Neil McKechnie
ffc5d91561 Update version.h 2021-09-23 08:59:43 +01:00
Neil McKechnie
e11fd18849 Update IO_DCCAccessory.cpp
Ensure the full range of addresses including 0 are handled.
2021-09-22 14:12:23 +01:00
Neil McKechnie
32eb8fe8c7 Update version.h (3.1.7draft)
Added partial list of changes from 3.1.6 to 3.1.7draft.
2021-09-22 14:00:05 +01:00
Neil McKechnie
e287af83ff DCC Turnouts: Store address/subaddress separately. Enable address 0.
The range of accessory decoder addresses for the <a> command is 0-511 in line with the DCC packet contents.  The turnout command previously rejected address 0; this has been changed to the same range of addresses can be used by both commands, i.e. address 0-511 and subaddress 0-3.  The linear address mapping remains so that linear address 1 is addr/subaddr 1/0; i.e. the first decoder address is not accessible by linear address.
2021-09-22 10:38:11 +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
Harald Barth
34474cbf5c WifiESP skeleton files 2021-09-21 09:23:52 +02:00
Harald Barth
7397a4089b first waveform on esp 2021-09-21 00:31:05 +02:00
Asbelos
08835e25c6 Merge branch 'EX-RAIL' of https://github.com/DCC-EX/CommandStation-EX into EX-RAIL 2021-09-18 13:10:18 +01:00
Asbelos
bda3c05265 Auto power on tell JMR 2021-09-18 13:10:13 +01:00
Neil McKechnie
f947c5bae5
Merge pull request #190 from DCC-EX/EX-RAIL-neil-HALDRIVERS
Additional and enhanced HAL drivers
2021-09-17 22:48:51 +01:00
Neil McKechnie
afe2ecdc14 Update IODevice.cpp
Remove potentially irritating diag messages
2021-09-17 12:44:27 +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
Asbelos
d077e3a2ff Auto power on and POWEROFF macro 2021-09-16 16:47:47 +01:00
Neil McKechnie
07cc45d861 Update IO_DFPlayer.h
Fix volume control command.
2021-09-16 12:39:51 +01:00
Neil McKechnie
f3658aaee7 Update IO_HCSR04.h
Change transmitPin to trigPin and receivePin to echoPin to match the markings on the device module.
2021-09-16 00:17:26 +01:00
Neil McKechnie
3dc0b1619c Update IO_DFPlayer.h 2021-09-15 21:37:38 +01:00
Neil McKechnie
592f87303e Update IO_AnalogueInputs.h
Increase frequency of ADC conversions to 4ms, since 10ms driver cycle isn't enough time for a 7.8ms conversion to complete reliably.
2021-09-15 10:44:43 +01:00
Neil McKechnie
02a715d54d New DFPlayer MP3 device, and tidy comments in other drivers. 2021-09-15 00:23:24 +01:00
Neil McKechnie
f7d34b92ee Update mySetup.cpp_example.txt 2021-09-14 17:14:29 +01:00
Neil McKechnie
d316b72069 VL53L0X Time-Of-Flight sensor driver
HAL Driver for VL53L0X Time-Of-Flight sensor.  Basic implementation, which doesn't include most of the calibration etc. so is very lean on memory and CPU but not as accurate as it could be.
2021-09-14 12:34:31 +01:00
Ash-4
fc9aa71d9f
Merge pull request #189 from DCC-EX/EX-RAIL-Ash
Ex rail ash
2021-09-11 13:35:11 -05:00
Ash-4
72528658be
Merge branch 'EX-RAIL' into EX-RAIL-Ash 2021-09-11 13:32:17 -05:00
Neil McKechnie
4121a5f4da
Merge pull request #188 from DCC-EX/EX-RAIL-neil-AnalogueInputs
Ex rail neil analogue inputs
2021-09-11 14:22:48 +01:00
Neil McKechnie
2ed578821f Add analogue inputs to HAL.
Add ability to read analogue inputs on arduino and on external ADS1115 I2C modules.
2021-09-11 13:35:11 +01:00