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

9 Commits

Author SHA1 Message Date
Neil McKechnie
7e601c38c4 HAL writeAnalogue function change.
IODevice::writeAnalogue() has an additional optional parameter "duration", specifying the time taken for the animation in units of 100ms (max 3276 seconds, or about 54 minutes).
2021-08-27 15:42:47 +01:00
Neil McKechnie
0aea9169b1 Rename IODevice::isActive(vpin) to isBusy(vpin). 2021-08-27 11:18:15 +01:00
Neil McKechnie
0c218e1e13 Add HAL function configureInput(vpin,...) and configureServo(vpin,...). 2021-08-27 10:58:00 +01:00
Neil McKechnie
dbabfdca80 Improvements to PCA9685 operation
Rationalise duplicated code;  improve initialisation;
2021-08-21 23:13:34 +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
Neil McKechnie
3b1759a88e Update IODevice.h to include other device includes files.. 2021-08-12 21:18:46 +01:00
Neil McKechnie
ec503e7d3e Make IODevice::read function return type consistent with underlying _read calls.
IODevice::read() now returns int, instead of bool.  This is consistent with the IODevice::_read() return and also allows for future devices that return a non-boolean value.
2021-08-12 12:01:10 +01:00
Asbelos
22b5d5e4c4 default off DIAG_LOOPTIMES 2021-08-12 08:32:48 +01:00
FrightRisk
5eff4c5ee5 Squash all commits on RMFT branch to create EX-RAIL branch 2021-08-03 17:12:25 -04:00