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

7 Commits

Author SHA1 Message Date
Asbelos
e11d2d08d1 HAL catch pin overlaps 2022-06-14 15:15:42 +01:00
Harald Barth
fd43a9b88b defines to reverse accessories and turnouts renamed 2021-11-25 23:10:03 +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
7dea284ba8 DCCAccessoryDecoder class tidy. RCN-213 option.
Rationalise address calculation into three macros.  Ensure device is added to device chain.
Allow inversion of the DCC packet to match definition of packet D bit in RCN-213, D=0 for 'throw' (rather than the DCC++ usage of D=1 for 'throw').
2021-08-27 21:47:13 +01:00
Neil McKechnie
93dfdcce53 Add <D HAL SHOW> command to list HAL device configuration.
Also, only display HAL device configurations at startup if DIAG_IO is #defined.
2021-08-27 15:44:26 +01:00
Neil McKechnie
9dacd24d27
Various HAL enhancements. (#182)
* Add <D SERVO vpin position> command

Allow a PWM servo to be driven to any arbitrary position.

* Enhancements for HAL drivers

Add state change notification for external GPIO module drivers;
Allow drivers to be installed statically by declaration (as an alternative to the 'create' call).

* Create IO_HCSR04.h

HAL driver for HC-SR04 ultrasonic distance sensor (sonar).

* Enable servo commands in NO-HAL mode, but return error.

Avoid compile errors in RMFT.cpp when compiled with basic HAL by including the Turnout::createServo function as a stub that returns NULL.

* Update IO_HCSR04.h

Minor changes

* Change <D SERVO>

Give the <D SERVO> command an optional parameter of the profile.  For example, <D SERVO 100 200 3> will slowly move the servo on pin 100 to PWM position corresponding to 200.  If omitted, the servo will move immediately (no animation).

* IODevice (HAL) changes

1) Put new devices on the end of the chain instead of the beginning.  This will give better performance for devices created first (ArduinoPins and extender GPIO devices, typically).
2) Remove unused functions.

* Update IO_HCSR04.h

Allow thresholds for ON and OFF to be separately configured at creation.

* Update IODevice.cpp

Fix compile error on IO_NO_HAL minimal HAL version.

* Update IO_PCA9685.cpp

Remove unnecessary duplicated call to min() function.
2021-08-17 23:41:34 +01:00
FrightRisk
5eff4c5ee5 Squash all commits on RMFT branch to create EX-RAIL branch 2021-08-03 17:12:25 -04:00