diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index 14b6bfe..2cd6c4c 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -316,7 +316,7 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream) ((address & 0x01FF) != address) // invalid address (limit 9 bits ) || ((subaddress & 0x03) != subaddress) // invalid subaddress (limit 2 bits ) || ((p[activep] & 0x01) != p[activep]) // invalid activate 0|1 - || ((onoff & 0x01) != onoff) // invalid onoff 0|1 + || (onoff > 2) // invalid onoff 0|1|2 ) break; // Honour the configuration option (config.h) which allows the command to be reversed #ifdef DCC_ACCESSORY_COMMAND_REVERSE