line added to pause program steps during OVERLOAD. case BASELINE
if (DCCWaveform::progTrack.getPowerMode()==POWERMODE::OVERLOAD) return;
-- also added a line in DCCWaveform.cpp
in DCCWaveform::setPowerMode(POWERMODE mode)
-- to pause while power is off due to PROG TRACK POWER OVERLOAD
and line added after case BASELINE in DCC.cpp
The SIGNAL macro has been changed to allow for use of RGB LEDs. Connect R and G pins, and assign as SIGNAL(redpin,0,greenpin). Then if amber is requested, the macro will set red and green on at the same time.
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).
WAITFOR(pin) waits until the corresponding pin is not busy (e.g. has finished moving the servo). SERVO2(pin, value, ms) moves to the nominated position in a time given in milliseconds by ms.
Rationalise address calculation into three macros. Ensure device is added to device chain.
Allow inversion of the DCC packet to match definition of packet D bit in RCN-213, D=0 for 'throw' (rather than the DCC++ usage of D=1 for 'throw').
<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.