<a addr subaddr 1> command puts a D=1 into the DCC packet for a DCC Accessory Decoder. This was previously though to correspond to a 'throw' request and a D=0 to a 'close' request. RCN-213 standard identifies that D=1 is 'close' and D=0 is 'throw', so this change allows CS to be configured to invert the states to conform to the RCN-213 definition.
If no route or automation definitions were present, the compiler warned that parameter stream is not used in function RMFT2::emitWithrottleDescriptions.
LED FADE command allows an LED to be attached to a PCA9685 PWM module and controlled to any arbitrary brightness (0-4095), changing over a specified period of time in milliseconds.
FADE(vpin,value,ms)
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).
* Re-enable native I2C driver.
* Minor non-functional changes to native I2C Manager.
* Minor changes to make variable types explicit in comparisons.
* Fix IODevice::loop() to avoid null pointer dereference.
Strange problems with LCD driver tracked down to being caused by a call to p->_loop() when p is NULL.
* Correct sense of comparison in LCN support function Turnout::setClosedStateOnly()
* Remove code (now unused) from LCD driver.
* Add I2C textual error messages.
* Add I2C textual error messages.
* Fix compile error in 4809 I2C driver.
* Remove init function call from SSD1306 driver.
loop() contains startTransaction which is called after handleInterrupt(). However, startTransaction is called within handleInterrupt so remove the extra call. This appears to solve strange problems encountered with the LCD display.
Ensure that the servo, VPIN and LCN turnouts are all initialised to closed if no initial state is provided in the create call or in EEPROM. This applies irrespective of the RCN-213 configuration settings.
commit b34205b142
Merge: 87032482829716
Author: Neil McKechnie <75813993+Neil-McK@users.noreply.github.com>
Date: Mon Aug 23 10:05:54 2021 +0100
Merge branch 'EX-RAIL' into ackRetry
commit 8703248c49
Author: Ash-4 <81280775+Ash-4@users.noreply.github.com>
Date: Sun Aug 22 16:47:38 2021 -0500
ACK RETRY max 255 with fallback to 3 if greater
And includes LCD lines for power and ACK diags.
commit f5d4522ed7
Author: Ash-4 <81280775+Ash-4@users.noreply.github.com>
Date: Sun Aug 22 16:40:13 2021 -0500
ACK RETRY updated datatypes
commit 1dbf236697
Author: Ash-4 <81280775+Ash-4@users.noreply.github.com>
Date: Sun Aug 22 16:35:14 2021 -0500
ACK RETRY updated datatypes
commit d93584e9a4
Author: Ash-4 <81280775+Ash-4@users.noreply.github.com>
Date: Sun Aug 22 13:16:24 2021 -0500
ACK RETRY updated default is 2 retries.
commit f58ebac670
Author: Ash-4 <81280775+Ash-4@users.noreply.github.com>
Date: Sat Aug 21 16:43:21 2021 -0500
ACK RETRY is 3 or less (default is 1)
commit 08350b215a
Author: Ash-4 <81280775+Ash-4@users.noreply.github.com>
Date: Sat Aug 21 11:55:17 2021 -0500
ACK RETRY
LCD display update.
lcd(0, F("RETRY %d %d %d %d"), ackManagerCv, ackManagerRetry, ackRetry, ackRetrySum);
commit 11cd216017
Author: Ash-4 <81280775+Ash-4@users.noreply.github.com>
Date: Sat Aug 21 00:54:28 2021 -0500
ACK RETRY
ACK retry code added to ackManagerSetup and callback.
The default is <D ACK RETRY 1>. For ACK tuning, set retry to zero.
Retry count is captured on the LCD display, and lines in the serial monitor.
commit b67027a1ed
Author: Ash-4 <81280775+Ash-4@users.noreply.github.com>
Date: Sat Aug 21 00:33:01 2021 -0500
ACK RETRY variables added
commit 34d2ab3543
Author: Ash-4 <81280775+Ash-4@users.noreply.github.com>
Date: Sat Aug 21 00:23:34 2021 -0500
Update DCCEXParser.cpp
LCD lines added to display power commands and ACK settings, when updated.
Also new command <D ACK RETRY 1>.
commit 8ca4011cb0
Author: Ash-4 <81280775+Ash-4@users.noreply.github.com>
Date: Fri Aug 20 23:58:13 2021 -0500
Update CommandStation-EX.ino
Update LCD row number for Ready and Free RAM.
commit 6571138389
Author: Harald Barth <haba@kth.se>
Date: Sun Aug 1 22:08:34 2021 +0200
optimize command parser for size
commit c4f659243e
Author: Harald Barth <haba@kth.se>
Date: Sun Aug 1 15:07:06 2021 +0200
optimize for loops for size (and speed)
commit 55b7091d5a
Author: Harald Barth <haba@kth.se>
Date: Sun Aug 1 12:45:29 2021 +0200
take less progmem for messages
commit 6d7c1925b0
Author: Harald Barth <haba@kth.se>
Date: Sun Aug 1 11:56:12 2021 +0200
only pragma -O3 critical functions
Ensure state is saved and restored from EEPROM as expected.
Make constructors for turnouts private. Otherwise, a statically created turnout may be initialising itself before the underlying HAL device has been created. By requiring the create() call be used, there is more control over the timing of the turnout object's creation.
<s> command currently prints the current states for outputs and for sensors, but prints the full configuration of turnouts. This change makes the turnout output consistent, i.e. just <H id state> is output for each turnout. The <T> command still outputs the full turnout definition.
JMRI currently isn't aware of the newer types of turnout in DCC++EX, so when it receives the definitions of turnouts it barfs on them. It still knows a turnout exists, but isn't able to display its full configuration. For DCC Accessory turnouts, the configuration message has changed so that it includes the DCC string (to distinguish them from other types of turnout). To enable current and older versions of JMRI to continue working with DCC turnouts, CS now reports the old and new formats, i.e. <T id addr subaddr state> and <T id DCC addr subadd state>. It currently accepts the first one and ignores the second one, but in the fullness of time it might accept the second one too.
Ensure that the <H> message is sent on the serial USB (to JMRI) whenever the turnout is closed or thrown, even if the request didn't originate on the serial USB.
Turnout class split into a base class for common code and specific subclasses for Servo, DCC, VPIN and LCN turnouts.
Interface further narrowed to reduce direct access to member variables.
Turnout creation command handling has been moved into the DCCEXParser class.
Turnout function and parameter names changed to make the Throw and Close functionality explicit.
Turnout commands <T id C> (close) and <T id T> (throw) added.
TurnoutData struct size has been reduced by one byte during rewrite of Turnout class. Consequently, this renders any previous turnout definitions in EEPROM incompatible with the new format. For safety, the version is increased so that incompatible EEPROM contents are discarded.