diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index 4a32902..cfe2563 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -41,7 +41,7 @@ #include "TrackManager.h" #include "DCCTimer.h" #include "EXRAIL2.h" -#include "Turntables.h" +// #include "Turntables.h" // This macro can't be created easily as a portable function because the // flashlist requires a far pointer for high flash access. @@ -96,6 +96,7 @@ const int16_t HASH_KEYWORD_ANOUT = -26399; const int16_t HASH_KEYWORD_WIFI = -5583; const int16_t HASH_KEYWORD_ETHERNET = -30767; const int16_t HASH_KEYWORD_WIT = 31594; +const int16_t HASH_KEYWORD_EXTT = 8573; int16_t DCCEXParser::stashP[MAX_COMMAND_PARAMS]; bool DCCEXParser::stashBusy; @@ -1021,25 +1022,45 @@ bool DCCEXParser::parseD(Print *stream, int16_t params, int16_t p[]) // ========================== // Turntable +// - list all +// - delete +// - operate (DCC) +// - operate (EXTT) +// - create EXTT +// - create DCC? - This TBA bool DCCEXParser::parseI(Print *stream, int16_t params, int16_t p[]) { switch (params) { case 0: // list turntable objects - return Turntable::printAll(stream); + StringFormatter::send(stream, F("\n")); + return true; + // return Turntable::printAll(stream); case 1: // delete turntable - if (!Turntable::remove(p[0])) - return false; - StringFormatter::send(stream, F("\n")); + // if (!Turntable::remove(p[0])) + // return false; + StringFormatter::send(stream, F("\n")); return true; case 2: // - rotate to position for DCC turntables case 3: // rotate to position for EX-Turntable { - + DIAG(F("Got %d parameters (2 or 3)"), params); + return true; } + + default: + { + if (params < 40) { + DIAG(F("Create turntable with %d parameters"), params); + return true; + } + } + break; + } + return false; } // CALLBACKS must be static diff --git a/IODevice.h b/IODevice.h index 8b8f3fe..769e111 100644 --- a/IODevice.h +++ b/IODevice.h @@ -542,7 +542,6 @@ protected: #include "IO_PCF8575.h" #include "IO_duinoNodes.h" #include "IO_EXIOExpander.h" -#include "IO_EXTurntable.h" #endif // iodevice_h diff --git a/IO_EXTurntable.h b/IO_EXTurntable.cpp similarity index 97% rename from IO_EXTurntable.h rename to IO_EXTurntable.cpp index 29ce679..f1a108b 100644 --- a/IO_EXTurntable.h +++ b/IO_EXTurntable.cpp @@ -20,9 +20,9 @@ /* * The IO_EXTurntable device driver is used to control a turntable via an Arduino with a stepper motor over I2C. * -* The EX-Turntable code lives in a separate repo (https://github.com/DCC-EX/Turntable-EX) and contains the stepper motor logic. +* The EX-Turntable code lives in a separate repo (https://github.com/DCC-EX/EX-Turntable) and contains the stepper motor logic. * -* This device driver sends a step position to Turntable-EX to indicate the step position to move to using either of these commands: +* This device driver sends a step position to EX-Turntable to indicate the step position to move to using either of these commands: * in the serial console * MOVETT(vpin, steps, activity) in EX-RAIL * Refer to the documentation for further information including the valid activities. diff --git a/Turntables.cpp b/Turntables.cpp.txt similarity index 100% rename from Turntables.cpp rename to Turntables.cpp.txt diff --git a/Turntables.h b/Turntables.h.txt similarity index 100% rename from Turntables.h rename to Turntables.h.txt