Asbelos
08076443cb
ERSP32 Build fix
2025-01-14 09:12:50 +00:00
Asbelos
748ddcde8c
Railcom Implementation
...
HAL driver, Railcom interpreter, block management, <r command.
See release notes
2025-01-13 14:40:59 +00:00
Harald Barth
84bc098157
seperate out the templates that make it possible to use bitwise operations on enums
2024-12-21 16:08:57 +01:00
Asbelos
5efe385f2e
Sensorcam
2024-11-02 13:25:35 +00:00
Asbelos
fa00e9e11b
Squashed commit of the following:
...
commit f13824164b853b2fec66f67b7f3296e2264a861b
Author: Asbelos <asbelos@btinternet.com>
Date: Thu Oct 10 16:07:42 2024 +0100
_s7 keyword generator
commit 8a7dc2643cd15a6d55dd1f257c4940d4167702fc
Author: Asbelos <asbelos@btinternet.com>
Date: Mon Oct 7 10:54:05 2024 +0100
comments
commit 801cddfef70a5ced01da9f022d4b0ad603264e0a
Author: Asbelos <asbelos@btinternet.com>
Date: Sun Oct 6 13:24:07 2024 +0100
simpler macro insert
commit 5883f474ee79274aaeca94aee13b2235accddbd6
Author: Asbelos <asbelos@btinternet.com>
Date: Sun Oct 6 13:18:29 2024 +0100
Auto include
commit 312fc255e4eb8aa4f77dcedbe7206aca22e00af6
Author: Asbelos <asbelos@btinternet.com>
Date: Sun Oct 6 13:12:51 2024 +0100
Cleanup to one class
commit 309407434928f14f22fef1ff2cdd0f29238f33fb
Author: Asbelos <asbelos@btinternet.com>
Date: Sun Oct 6 10:34:16 2024 +0100
peeled back
commit aa2a6ad1191dbcd6ed75416d457e47b68373277d
Author: Asbelos <asbelos@btinternet.com>
Date: Sat Oct 5 18:27:43 2024 +0100
all fastpins
commit 931baf4b6d4d5b4d55389a64efd5885eeb2218ff
Author: Asbelos <asbelos@btinternet.com>
Date: Sat Oct 5 16:28:03 2024 +0100
Partial lib extract
commit 47bc3b55fc2259cbec9ab830850ea07044ef66be
Author: Asbelos <asbelos@btinternet.com>
Date: Fri Oct 4 15:41:51 2024 +0100
fixes and SEG7 macro
commit 3f26ca2d1a39203428de60cb27f31008847c4233
Author: Asbelos <asbelos@btinternet.com>
Date: Fri Oct 4 14:33:23 2024 +0100
enums for exrail easy
commit 7e7c00594bf34ebfc331485befc9feaf66cc32ff
Author: Asbelos <asbelos@btinternet.com>
Date: Fri Oct 4 13:16:57 2024 +0100
Working
commit fc4df878482ee3eca6e1232a1ed49ac0c06d2a55
Author: Asbelos <asbelos@btinternet.com>
Date: Fri Oct 4 09:27:46 2024 +0100
leds and buttons
2024-10-10 19:38:35 +01:00
Asbelos
277431e84c
NeoPixel support
...
commit 2bbb5c111907cab37e5c068dc18e084f404f2a2e
Author: Asbelos <asbelos@btinternet.com>
Date: Fri Sep 20 12:13:21 2024 +0100
EXRAIL use neopixel range instead of loop
commit 3aabb51888d61d88c3c26a3617eccaa74e3f64d4
Author: Asbelos <asbelos@btinternet.com>
Date: Wed Sep 18 17:06:00 2024 +0100
Neopixel signals with blue-tint
See Release Notes file
commit 8e6fe6df21bc758ee1b715d97c254a4c1488ffe2
Author: Asbelos <asbelos@btinternet.com>
Date: Thu Sep 12 08:35:26 2024 +0100
HAL write range
commit 66e57b5ab2e7938bf5f97960ab73017749d8fc4b
Author: Asbelos <asbelos@btinternet.com>
Date: Sun Sep 8 09:26:37 2024 +0100
Killblink on neopixel set.
commit 360c42667500fdd93e35e688c7461731bc8dc50d
Merge: dd16e0d b026417
Author: Asbelos <asbelos@btinternet.com>
Date: Sat Sep 7 16:45:29 2024 +0100
Merge branch 'devel' into devel-pauls-i2c-devices
commit dd16e0da972a414cac66755b61b6922691f88030
Author: Asbelos <asbelos@btinternet.com>
Date: Sat Sep 7 13:00:26 2024 +0100
Notes
commit e823db3d244919f5529d22c71de8f4de834e21dd
Author: Asbelos <asbelos@btinternet.com>
Date: Sat Sep 7 11:16:30 2024 +0100
Neopixel change to 8,8,8
commit d3d6cc97fb68ee2314a3d4a3e10f92542044c124
Author: Asbelos <asbelos@btinternet.com>
Date: Fri Sep 6 13:25:44 2024 +0100
Neopixel <o> cmd
commit 03d8d5f93d477246e8ceecf6500133845a0d5129
Author: Asbelos <asbelos@btinternet.com>
Date: Fri Sep 6 08:08:18 2024 +0100
Its working!!
commit 235f3c82b5c8e94106bc63dfd5f2957b423f1601
Author: Asbelos <asbelos@btinternet.com>
Date: Thu Sep 5 22:02:29 2024 +0100
Update IO_NeoPixel.h
commit 530b77bbab4605a3fdfdec735ef01d0b56ef543c
Author: Asbelos <asbelos@btinternet.com>
Date: Tue Sep 3 15:04:40 2024 +0100
NEOPIXEL driver and macros
commit 2a895fbbd531e3ee778962eec59144a602cba9bc
Author: Asbelos <asbelos@btinternet.com>
Date: Tue Sep 3 11:26:17 2024 +0100
First compile neopixel driver
commit c6f2db79094d3b0a0c5322c859868e9025bcb6eb
Merge: a7df84b 7395aa4
Author: Asbelos <asbelos@btinternet.com>
Date: Tue Sep 3 10:07:12 2024 +0100
Merge branch 'devel' into devel-pauls-i2c-devices
commit a7df84b01cc474c31356456bc1db220c800743cb
Author: Asbelos <asbelos@btinternet.com>
Date: Tue Sep 3 09:56:05 2024 +0100
NEOPIXEL EXRAIL
commit ead6e5afa11d526d9a366eeb6013e7eaa16bcb76
Author: Asbelos <asbelos@btinternet.com>
Date: Tue Sep 3 09:55:36 2024 +0100
NEOPIXEL EXRAIL
commit 0cb175544e4771415c22d6bdc5ed0c331ce76f95
Author: pmantoine <pma-github@milleng.com.au>
Date: Sat Feb 24 17:29:10 2024 +0800
More TCA8418
commit 208205180193aec382fcc25423fb6a81a078e407
Author: pmantoine <pma-github@milleng.com.au>
Date: Sat Feb 24 13:02:34 2024 +0800
TCA8418 initial HAL driver scaffolding
2024-09-22 12:37:38 +01:00
Asbelos
dc2eae499f
RocoDriver->EncoderThrottle
2024-07-18 09:39:32 +01:00
Asbelos
95bf5aae38
HAL defaults control
2024-01-14 20:20:22 +00:00
Asbelos
96fdbfdc89
Trainbrains block occupancy
2023-11-26 12:31:41 +00:00
peteGSX
8437b0e7aa
Updated broadcasts
2023-09-15 06:26:29 +10:00
peteGSX
df2f09f4d2
Fix build errors
2023-09-01 09:04:48 +10:00
peteGSX
f40d57d8bd
Add DCC type, EXTT broadcast from driver
2023-09-01 08:44:32 +10:00
peteGSX
6cad794411
Working with 15 positions
2023-08-29 19:04:45 +10:00
peteGSX
98f8022268
Fix device driver, disable objects, start parser
2023-08-21 06:43:06 +10:00
peteGSX
1491da4813
Starting, very broken
2023-08-20 19:26:04 +10:00
Neil McKechnie
f348857ddb
Add FLAGS device for EX-RAIL state communications. Improve VPIN display in messages.
...
FLAGS HAL device added to IODevice.h, which allows use of SET/RESET/<Z>/<T> to set and reset a VPIN state, and to allow <S>/IF/IFNOT/AT/WAITFOR/etc. to monitor the VPIN state.
Also, correct handling of VPINs above 32767 in DIAG calls within IODevice.cpp and IODevice.h.
2023-03-27 12:39:11 +01:00
Neil McKechnie
a36dccfad0
Add UserAddin class to facilitate user-written cyclic functions.
...
UserAddin allows a function to be 'plugged in' to the IODevice (HAL) framework and executed cyclically, using just one line of code in the myHal.cpp. This will facilitate functions for displaying CS state on OLEDs and LCDs, among other things.
2023-02-21 10:55:37 +00:00
Neil McKechnie
d0445f157c
Update IODevice.h
...
Finish changes relating to PWM frequency (doh!)
2023-02-15 22:34:37 +00:00
Neil McKechnie
21c82b37b0
Allow frequency of PWM to be set for PCA9685 drivers.
...
It's a parameter on the create() call, e.g.
PCA9685::create(vpin, npins, address, frequency);
2023-02-15 22:29:21 +00:00
Neil McKechnie
9dd9990979
Improve formatting of I2CAddress data type in diagnostics.
2023-02-09 00:16:06 +00:00
Neil McKechnie
31ce2e3fef
EXTurntable - change I2C address type to I2CAddress.
2023-02-07 18:36:48 +00:00
Neil McKechnie
261ccf2f3b
HAL - change variable type for PCA9685 data.
2023-02-07 15:09:21 +00:00
Neil McKechnie
13bd6ef9eb
HAL: Add support for Extended Addresses and I2C Multiplexer
...
Change I2C addresses from uint8_t to I2CAddress, in preparation for MUX support. Currently, by default, I2CAddress is typedef'd to uint8_t.
MUX support implemented for AVR and Wire versions.
2023-02-04 23:57:22 +00:00
Neil McKechnie
45657881eb
Merge branch 'devel-nmck' of https://github.com/DCC-EX/CommandStation-EX into devel-nmck
2023-02-04 23:01:51 +00:00
Neil McKechnie
81559998ec
Update IODevice base class to better support filter drivers
...
Filter drivers provide extra functionality above a hardware driver. For example, a hardware driver for a PWM module may just set the PWM ratio, but a separate filter driver could animate motors or servos over time, calling the PWM driver to output the pulses. This would allow the animations to be easily implemented on a different type of PWM module.
2023-02-03 12:55:25 +00:00
pmantoine
be88344407
PCF8575 16-bit port device support added
2023-02-02 07:12:47 +08:00
Neil McKechnie
bdffd36820
IODevice.h - change visibility of findDevice to protected.
...
To support nested drivers efficiently (i.e. to allow the higher driver to call another driver directly, without searching for a VPIN every time), the visibility of the IODevice::findDevice() function has been changed from private to protected.
2023-01-31 15:24:38 +00:00
Neil McKechnie
0c054c4d42
Merge branch 'devel' into devel-nmck
2023-01-14 23:37:17 +00:00
Neil McKechnie
3c5b7bbcfe
HAL updates
...
Remove redundant deferment of device _begin() calls (no longer necessary).
Improve diagnostic loop measurement.
2023-01-14 17:15:30 +00:00
peteGSX
d02c6b1f61
Merge branch 'devel' into add-ex-ioexpander
2022-12-30 08:04:49 +10:00
peteGSX
322cb3db54
Include driver in IODevice.h
2022-12-29 08:44:08 +10:00
Asbelos
0be25f6e7f
Squashed commit of the following:
...
commit e06668f042e4b4646f6eab298374fd8f062c7a7f
Author: Asbelos <asbelos@btinternet.com>
Date: Mon Dec 26 10:09:34 2022 +0000
speedup
commit 3e5d3b1caaac79757262ebb05d0d31ac0d2c9c7b
Author: Asbelos <asbelos@btinternet.com>
Date: Sun Dec 25 22:11:56 2022 +0000
Rename
commit 81099af42b9a4f977232595aaddcafa72e34158d
Author: Asbelos <asbelos@btinternet.com>
Date: Sun Dec 25 21:35:38 2022 +0000
spelling and polling
commit 9240e7c6bab74dfead59c5d12da29cf31518d98f
Author: Asbelos <asbelos@btinternet.com>
Date: Sun Dec 25 20:52:07 2022 +0000
input working
commit 6c1c681a26987a4cac6a49dd82f7e9974b58c9ad
Author: Asbelos <asbelos@btinternet.com>
Date: Wed Dec 21 11:18:39 2022 +0000
input working
1 board, no kit map, output untested
commit 5ce67fac972dc864cec4c930361a2ab9f12449c8
Author: Asbelos <asbelos@btinternet.com>
Date: Sun Dec 18 15:32:37 2022 +0000
Include IO_DNU08 automatically
commit ac8d453d2c1877c5372b406dd10e6e03a2969e5f
Author: Asbelos <asbelos@btinternet.com>
Date: Sun Dec 18 12:28:13 2022 +0000
BNOU8 HAL driver
2022-12-26 10:41:15 +00:00
Harald Barth
452ffc5725
changed IODevice code to use ADCee
2022-10-05 23:14:07 +02:00
peteGSX
d333a265f4
Add EX-Turntable to PORTX_HAL ready to test
2022-08-14 06:48:03 +10:00
Asbelos
3496b99197
HAL minor simplification
2022-06-14 17:50:57 +01:00
Asbelos
6b7c2ccdf0
I2C address checks cleaned up
2022-06-14 17:35:29 +01:00
Asbelos
08eaa8ddb7
I2C overlap checks (working but messy)
...
Needs disgnostic clean and promotion of i2c address to IODevice.
2022-06-14 17:21:11 +01: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
b7bcd13347
Fix Arduino pin pullup initial state.
...
If an Arduino pin was used as an input (e.g. by EXRAIL) without previously configuring it, the default pullup wouldn't be set up. Now, on first call to the _read() method the pullup will be enabled.
2021-10-21 16:43:42 +01:00
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
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
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
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
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
Neil McKechnie
1bb7b5cc77
Make defaults for PWM (servo) positions 0 (PWM off) if not configured.
...
When writing to a PWM device (servo or LED for example), it is possible to request the target position in the call, or to ask for a SET or RESET position. In the latter case, the positions corresponding to SET and RESET must be known, i.e. preconfigured. Defaults were assigned for this, but because the correct values will depend on the hardware device being driven, the defaults have been removed.
In addition, the <T> command, when defining a servo turnout, now configures the PWM positions (not required by <T> commands, but desirable for consistency with other commands).
2021-08-29 12:04:13 +01:00
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