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

1638 Commits

Author SHA1 Message Date
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
Neil McKechnie
f1f1be8ad9 Oops- forgot to push this one. Name changes again. 2023-02-12 09:18:02 +00:00
Neil McKechnie
ec73ac69d9 A few more name changes to more generic names 2023-02-12 09:01:16 +00: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
Neil McKechnie
a9971968c0 Update I2CManager_NonBlocking.h
Reduce platform-specific part of ATOMIC_BLOCK definition to one inline function _getInterruptState()
2023-02-10 22:58:58 +00:00
Neil McKechnie
e498915b28 Update I2CManager_AVR.h
Avoid loop in I2C_sendStart function.
2023-02-10 19:57:42 +00:00
Neil McKechnie
c315895cd9 Update I2CManager_NonBlocking.h
Rework ATOMIC_BLOCK to further simplify and clarify.
2023-02-10 19:52:24 +00:00
Neil McKechnie
1cfe5a1e46 Update I2CManager_STM32.h
Fix some merge errors.
2023-02-10 18:22:35 +00:00
Neil McKechnie
ad4cedfccf Update I2CManager_NonBlocking.h
Rationalise ATOMIC_BLOCK macro definition and remove reliance on atomic.h.
2023-02-10 18:21:50 +00:00
Neil McKechnie
98697427a3 Update I2CManager_SAMD.h
Fix compile errors following other changes
2023-02-10 18:21:06 +00:00
Neil McKechnie
f5b5809ba5 Merge branch 'devel-nmck' of https://github.com/DCC-EX/CommandStation-EX into devel-nmck 2023-02-10 15:57:57 +00:00
Neil McKechnie
0b307a67e4 I2CManager: Update native drivers for MUX support from the common code. 2023-02-10 15:47:44 +00:00
Neil McKechnie
553a94bf67 I2CManager: Refactor common driver code.
Put mux handling into I2CManager_NonBlocking.h to keep the native (controller-specific) drivers more simple.
Remove almost all but one of the static definitions, in preparation for supporting multiple I2C buses.
2023-02-10 15:46:50 +00:00
Neil McKechnie
18b148ed1f IO_EXFastClock - fix compile error due to closing brace outside of #if block. 2023-02-10 15:35:17 +00:00
Neil McKechnie
1ffb3a9836 Update IO_OLEDDisplay.h
Round up number of characters per line, so that the last few pixels on the line are erased when writing blanks.
2023-02-10 15:34:13 +00:00
Neil McKechnie
f358880f30 IO_VL53L0X: Some bug fixes.
Modify state model, and improve recovery after <D HAL RESET>.
2023-02-10 15:32:41 +00:00
Neil McKechnie
5f9705d1b7 Improve IODevice::reset function
Ensure that the _loop() function is able to run after a device is reset.
2023-02-10 15:30:35 +00:00
Neil McKechnie
7e2487ffbb Avoid compiler error when no HAL installed. 2023-02-10 15:29:09 +00:00
pmantoine
fd07402aec STM32 better I2C still work in progress 2023-02-09 15:12:16 +08:00
Neil McKechnie
8083bd1b3b Merge branch 'devel-nmck' of https://github.com/DCC-EX/CommandStation-EX into devel-nmck 2023-02-09 00:18:17 +00:00
Neil McKechnie
9e0e110b5d Update defines.h - inappropriate define NO_INTERRUPTS replaced with I2C_USE_WIRE. 2023-02-09 00:17:31 +00:00
Neil McKechnie
7de46a0c17 Add <D HAL RESET> command to attempt to reset failed devices. 2023-02-09 00:16:39 +00:00
Neil McKechnie
9dd9990979 Improve formatting of I2CAddress data type in diagnostics. 2023-02-09 00:16:06 +00:00
Neil McKechnie
dd0ee8b50a Additional support for Extended I2C Addresses 2023-02-09 00:13:23 +00:00
pmantoine
d7f92d7b88 STM32 native I2C driver updates 2023-02-08 13:06:11 +08:00
pmantoine
3fbcd6f300 STM32 native I2C driver initial edits 2023-02-08 10:04:18 +08:00
Neil McKechnie
a0f0b860eb Update version.h 2023-02-07 23:21:23 +00:00
Neil McKechnie
efb2666060 DCCTimer_AVR - incorporate Haba's optimisations to ADC scanning 2023-02-07 23:18:59 +00:00
Neil McKechnie
73a7d3e0ca Update I2CManager_AVR.h
Bug fix in native driver MUX code.
2023-02-07 23:16:37 +00:00
Neil McKechnie
47cb43d1e9 Update IO_OLEDDisplay.h
Make display updates non-blocking (after initialisation completes).
2023-02-07 23:16:00 +00:00
Neil McKechnie
e2e9b7bae7 Update version.h 2023-02-07 22:04:09 +00:00
Neil McKechnie
31ce2e3fef EXTurntable - change I2C address type to I2CAddress. 2023-02-07 18:36:48 +00:00
Neil McKechnie
d8881deb6a Merge branch 'devel' into devel-nmck 2023-02-07 18:05:18 +00:00
Neil McKechnie
5439dd3158 Suppress compiler warnings. 2023-02-07 17:59:40 +00:00
Neil McKechnie
aad0d28d1f Servo driver - split PCA9685 into a filter + PWM driver.
Two new drivers: PCA9685pwm drives the PCA9685 I2C device directly, and Servo driver which acts as a 'shim' over the top to control animations.  This is aimed at supporting devices like the EXIOExpander by allowing the Servo driver to talk to the EXIOExpander driver instead, to animate servos on another controller.
2023-02-07 17:24:05 +00:00