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

2114 Commits

Author SHA1 Message Date
Neil McKechnie
8c8a913678 Update IO_HALDisplay.h
Check for memory allocation errors.
2023-02-25 11:43:05 +00:00
Neil McKechnie
711ad6f030 Update SSD1306Ascii.cpp
Add remaining extended graphics characters (still no international characters though.
2023-02-25 11:42:43 +00:00
Neil McKechnie
c2983efebb Update to comments 2023-02-25 11:42:12 +00:00
Asbelos
02ee8ad080 Removed duplicate DIAG 2023-02-24 16:56:21 +00:00
Neil McKechnie
780c6ea162 Revert "Update DisplayInterface.cpp"
This reverts commit a23f5839b7.
2023-02-24 09:39:00 +00:00
Neil McKechnie
8582e51483 Change example EXRAIL DFplayer calls from SERVO to ANOUT. 2023-02-23 20:57:25 +00:00
Neil McKechnie
cdf3927aad Update I2CManager.h
Make getMuxCount() publicly visible.
2023-02-23 20:52:40 +00:00
Neil McKechnie
ddfc67d2e3 Remove files that were incorrectly included in the merge. 2023-02-23 20:52:13 +00:00
Neil McKechnie
a23f5839b7 Update DisplayInterface.cpp
Remove dummy display driver object - it's unnecessary now as a null pointer is benign in this context.
2023-02-23 20:24:42 +00:00
Neil McKechnie
eddd6382d9 Update IO_EXFastclock.h
Update to support extended I2C addresses.
2023-02-23 20:23:08 +00:00
Neil McKechnie
45e3e3d185 Update IO_RotaryEncoder.h
Update to support extended I2C addresses.
2023-02-23 20:17:15 +00:00
Neil McKechnie
5e9ae4a0ac Remove redundant commented out code. 2023-02-23 20:16:29 +00:00
Neil McKechnie
39d953ed29
Merge pull request #312 from DCC-EX/devel-nmck
Merge Devel-nmck:
I2C Multiplexer support through Extended Addresses added for Wire, 4209 and AVR I2C drivers.
I2C retries when an operation fails.
I2C timeout handling and recovery completed.
I2C SAMD Driver Read code completed.
PCF8575 I2C GPIO driver added.
EX-RAIL ANOUT function for triggering analogue HAL drivers (e.g. analogue outputs, DFPlayer, PWM).
EX-RAIL SCREEN function for writing to screens other than the primary one.
Installable HALDisplay Driver, with support for multiple displays.
Layered HAL Drivers PCA9685pwm and Servo added for native PWM on PCA9685 module and for animations of servo movement via PCA9685pwm. This is intended to support EXIOExpander and also replace the existing PCA9685 driver.
Add <D HAL RESET> to reinitialise failed drivers (it calls the _begin method of all HAL drivers to reinitialise them).
Add UserAddin facility to allow a user-written C++ function to be declared in myHal.cpp, to be called at a user-specified frequency.
Add ability to configure clock speed of PCA9685 drivers (to allow flicker-free LED control).
Improve stability of VL53L0X driver when XSHUT pin connected.
Enable DCC high accuracy mode for STM32 on standard motor shield (pins D12/D13).
Incorporate improvements to ADC scanning performance (courtesy of HABA).
2023-02-23 11:20:17 +00:00
Neil McKechnie
b7483d99e9 Update version.h 2023-02-23 11:13:05 +00:00
Neil McKechnie
ce3885b125 Update DisplayInterface.h
Remove compiler warning
2023-02-23 10:36:42 +00:00
Neil McKechnie
c52b4a60a5 Update IO_HALDisplay.h
Update comments.
2023-02-22 21:34:52 +00:00
Neil McKechnie
ef85d5eaba Update version.h
4.2.18
2023-02-22 21:28:16 +00:00
Neil McKechnie
f281938606 Merge branch 'devel' into devel-nmck 2023-02-22 21:24:08 +00:00
Neil McKechnie
a405d36523 Rename class OLEDDisplay to HALDisplay. 2023-02-22 21:11:37 +00:00
Neil McKechnie
8e8ae90030 Update I2CManager.cpp
Add Real-time clock as a device address category (address 0x68).
2023-02-22 21:09:40 +00:00
Neil McKechnie
c3675367ed Update IO_VL53L0X.h
Configure XSHUT control so that the pull-up on the module raises the pin to +2.8V rather than trying to drive it to +5V.
2023-02-22 21:08:09 +00:00
Neil McKechnie
4deb323802 Update LiquidCrystal_I2C.cpp
Ensure that pipelined I/O requests complete before the next one is set up.
2023-02-22 21:06:39 +00:00
Neil McKechnie
4eb277f19e Refactor Display handler to (hopefully) improve clarity. 2023-02-22 21:06:03 +00:00
Neil McKechnie
c2e8557c4c defines.h - cosmetic change to indenting.
Lay out long #if statement with indents to make it a bit easier to read.
2023-02-21 11:12:31 +00:00
Neil McKechnie
8e90bb6996 Enable extended addresses and extended OLED characters on all but Nano, Uno and Mega4809..
Define I2C_EXTENDED_ADDRESS on most platforms, and define NO_EXTENDED_CHARACTERS on Nano, Uno and Mega4809.
2023-02-21 11:07:19 +00:00
Neil McKechnie
034bb6b675 Update DCCTimerSTM32.cpp
Enable hardware pulse generation on STM32 for pins 12 and 13 (standard motor shield pins), using timers TIM2 and TIM3.  Any other pins will currently be controlled directly by the interrupt routine (in effect, by digitalWrite calls).
2023-02-21 11:03:14 +00:00
Neil McKechnie
43b1e8db21 Update LCD driver to make it more reliable
Delay times at startup extended to make start-up configuration more reliable.
2023-02-21 11:00:27 +00: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
33229b4847 Update SSD1306Ascii.cpp
Bugfix: Move calculation of m_charsPerColumn and m_charsPerRow into constructors, to avoid incorrect random values being reported.
2023-02-19 19:14:15 +00:00
Neil McKechnie
173676287c Allow extended I2C addresses to be specified in non-extended configuration
If an extended I2C address is specified (including mux and/or subbus) then these parameters are ignored, but a warning output to the diagnostic console.
2023-02-18 09:32:38 +00:00
Neil McKechnie
9797a0fd2d Add high accuracy timing for STM32, on pins D3 and D6. 2023-02-17 16:04:21 +00:00
Neil McKechnie
10cd580061 Update I2CManager_NonBlocking.h
Missing initialisation of read buffer pointer!
2023-02-16 22:27:23 +00:00
Neil McKechnie
d6c8595f8a Update Display.h
Get rid of compiler warning.
2023-02-16 16:50:42 +00:00
Neil McKechnie
6b863ea483 Update I2CManager_NonBlocking.h
Cosmetic changes
2023-02-16 16:41:33 +00:00
Neil McKechnie
8ed3bbd845 Support for multiple displays
Refactor display handling so DisplayInterface class passes the relevant commands to the relevant display objects.
2023-02-16 16:41:13 +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
0118aa037d Merge branch 'devel-nmck' of https://github.com/DCC-EX/CommandStation-EX into devel-nmck 2023-02-15 22:29:28 +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
pmantoine
67bd886a98 USB Serial fixes for EX-RAIL & debug 2023-02-15 08:51:21 +08:00
Neil McKechnie
3292c93192 Update I2CManager.cpp
Report address 0x3d as (probably) OLED Display.
If an I2C probe for a device times out, assume that there's a bus problem on the MUX sub-bus, and skip the rest of the devices on that bus.  This reduces the impact of the long timeout on some Wire implementations.
2023-02-14 21:56:11 +00:00
Harald Barth
7311f2ce64 LCN bugfix 2023-02-12 20:38:03 +01:00
Harald Barth
2ada89f918 LCN bugfix 2023-02-12 20:35:57 +01:00
Neil McKechnie
f1f1be8ad9 Oops- forgot to push this one. Name changes again. 2023-02-12 09:18:02 +00:00
peteGSX
0b0aba7aef
Merge pull request #305 from DCC-EX:41-feature-request-enable-servo-animations-in-ex-ioexpander
Fix myHal example for EX-IOExpander
2023-02-12 19:14:59 +10:00
peteGSX
9c95eb6905 Servo animation moved to EX-IO 2023-02-12 19:06:46 +10:00
Neil McKechnie
ec73ac69d9 A few more name changes to more generic names 2023-02-12 09:01:16 +00:00
peteGSX
47cda83210 Disabled servo animations 2023-02-12 10:36:26 +10:00
Neil McKechnie
35f3cca9b3 Rename LCDDisplay class to Display; renameEXRAIL LCD2 macro to SCREEN 2023-02-11 23:37:09 +00:00
Neil McKechnie
65f7a4917f Separate out lcd (write to default display) and lcd2 (any display). 2023-02-11 17:04:18 +00:00
Neil McKechnie
8be9d9e0b0 Support for multiple displays (OLED etc).
New EXRAIL command LCD2(display,row,"text").  Display 0 is the usual one, other displays can be configured through HAL.
2023-02-11 15:47:50 +00:00