diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp
index bcd258a..d66b51f 100644
--- a/DCCEXParser.cpp
+++ b/DCCEXParser.cpp
@@ -387,16 +387,13 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
case 'A': // EXTENDED ACCESSORY
{
+ // Note: if this happens to match a defined EXRAIL
+ // DCCX_SIGNAL, then EXRAIL will have intercepted
+ // this command alrerady.
if (params!=2) break;
if (p[0] != (p[0] & 0x7F)) break;
if (p[1] != (p[1] & 0x1F)) break;
-#ifdef EXRAIL_ACTIVE
- // Ask exrail if this is just changing the aspect on a
- // predefined DCCX_SIGNAL. Because this will handle all
- // the IFRED and ONRED type issues at the same time.
- if (RMFT2::signalAspectEvent(p[0],p[1])) return;
-#endif
- DCC::setExtendedAccessory(p[0],p[1],3);
+ DCC::setExtendedAccessory(p[0],p[1]);
}
return;
diff --git a/EXRAIL2.cpp b/EXRAIL2.cpp
index 928bc79..014e42b 100644
--- a/EXRAIL2.cpp
+++ b/EXRAIL2.cpp
@@ -802,7 +802,10 @@ void RMFT2::loop2() {
}
case OPCODE_ASPECT: {
// operand is address<<5 | value
- DCC::setExtendedAccessory(operand>>5, operand & 0x1F);
+ int16_t address=operand>>5;
+ byte aspect=operand & 0x1f;
+ if (!signalAspectEvent(address,aspect))
+ DCC::setExtendedAccessory(address,aspect);
break;
}
diff --git a/EXRAIL2Parser.cpp b/EXRAIL2Parser.cpp
index 99f0c37..7969750 100644
--- a/EXRAIL2Parser.cpp
+++ b/EXRAIL2Parser.cpp
@@ -51,6 +51,14 @@ void RMFT2::ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16
opcode=0;
break;
+ case 'A': //
+ if (paramCount!=2) break;
+ // Ask exrail if this is just changing the aspect on a
+ // predefined DCCX_SIGNAL. Because this will handle all
+ // the IFRED and ONRED type issues at the same time.
+ if (signalAspectEvent(p[0],p[1])) opcode=0; // all done
+ break;
+
case 'L':
// This entire code block is compiled out if LLC macros not used
if (!(compileFeatures & FEATURE_LCC)) return;
diff --git a/version.h b/version.h
index 84eeedf..341c61e 100644
--- a/version.h
+++ b/version.h
@@ -3,7 +3,11 @@
#include "StringFormatter.h"
-#define VERSION "5.2.33"
+#define VERSION "5.2.34"
+// 5.2.34 - Command fopr DCC Extended Accessories
+// - Exrail ASPECT(address,aspect) for above.
+// - EXRAIL DCCX_SIGNAL(Address,redAspect,amberAspect,greenAspect)
+// - Exrail intercept for DCC Signals.
// 5.2.33 - Exrail CONFIGURE_SERVO(vpin,pos1,pos2,profile)
// 5.2.32 - Railcom Cutout (Initial trial Mega2560 only)
// 5.2.31 - Exrail JMRI_SENSOR(vpin [,count]) creates types.