diff --git a/CommandStation-EX.ino b/CommandStation-EX.ino index 691c5e3..cbefe6e 100644 --- a/CommandStation-EX.ino +++ b/CommandStation-EX.ino @@ -131,7 +131,9 @@ void setup() RMFT::begin(); #ifdef ARDUINO_ARCH_ESP32 +#ifdef BOOSTER_INPUT dccSniffer = new Sniffer(BOOSTER_INPUT); +#endif // BOOSTER_INPUT #endif // ARDUINO_ARCH_ESP32 // Invoke any DCC++EX commands in the form "SETUP("xxxx");"" found in optional file mySetup.h. diff --git a/DCCPacket.h b/DCCPacket.h index dc46c4a..e754142 100644 --- a/DCCPacket.h +++ b/DCCPacket.h @@ -64,12 +64,8 @@ public: return (bcmp(_data, right._data, _len) == 0); }; void print(HardwareSerial &s) { - s.print("<* DCCPAKET "); + s.print("<* DCCPACKET "); for (byte n = 0; n< _len; n++) { -// byte b = 8; -// while (b--) { -// s.print(_data[n]&(1<= 64) - fakecounter = 0; - fakecounter++; byte bit = 0; diffticks = capticks - lastticks; if (lastedge != posedge) { @@ -128,12 +123,7 @@ void IRAM_ATTR Sniffer::processInterrupt(int32_t capticks, bool posedge) { bit = 1; } else { bit = 0; - }/* - if (fakecounter == 7 || fakecounter == 34 || fakecounter == 62 || fakecounter == 63) { - bit = 0; - } else { - bit = 1; - }*/ + } // update state variables for next round lastticks = capticks; lastedge = posedge;