mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-07-28 09:53:45 +02:00
Add flag to invert DCC Accessory command <a> behaviour
<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.
This commit is contained in:
3
DCC.cpp
3
DCC.cpp
@@ -239,6 +239,9 @@ void DCC::updateGroupflags(byte & flags, int16_t functionNumber) {
|
||||
}
|
||||
|
||||
void DCC::setAccessory(int address, byte number, bool activate) {
|
||||
#ifdef DIAG_IO
|
||||
DIAG(F("DCC::setAccessory(%d,%d,%d)"), address, number, activate);
|
||||
#endif
|
||||
// use masks to detect wrong values and do nothing
|
||||
if(address != (address & 511))
|
||||
return;
|
||||
|
Reference in New Issue
Block a user