diff --git a/CommandStation-EX.ino b/CommandStation-EX.ino index 9e38ccc..80d8b4e 100644 --- a/CommandStation-EX.ino +++ b/CommandStation-EX.ino @@ -91,7 +91,7 @@ void setup() // STANDARD_MOTOR_SHIELD, POLOLU_MOTOR_SHIELD, FIREBOX_MK1, FIREBOX_MK1S are pre defined in MotorShields.h DCC::begin(MOTOR_SHIELD_TYPE); - // Start RMFT (ignored if no automnation) + // Start RMFT aka EX-RAIL (ignored if no automnation) RMFT::begin(); diff --git a/DCC.cpp b/DCC.cpp index 30127f0..6674fb9 100644 --- a/DCC.cpp +++ b/DCC.cpp @@ -33,7 +33,7 @@ #include "version.h" #include "FSH.h" #include "IODevice.h" -#include "RMFT2.h" +#include "EXRAIL2.h" #include "CommandDistributor.h" // This module is responsible for converting API calls into @@ -252,7 +252,7 @@ void DCC::setAccessory(int address, byte number, bool activate) { b[1] = ((((address / 64) % 8) << 4) + (number % 4 << 1) + activate % 2) ^ 0xF8; // second byte is of the form 1AAACDDD, where C should be 1, and the least significant D represent activate/deactivate DCCWaveform::mainTrack.schedulePacket(b, 2, 4); // Repeat the packet four times -#if defined(RMFT_ACTIVE) +#if defined(EXRAIL_ACTIVE) RMFT2::activateEvent(address<<2|number,activate); #endif } diff --git a/DCCEX.h b/DCCEX.h index ebae436..00d89de 100644 --- a/DCCEX.h +++ b/DCCEX.h @@ -43,7 +43,7 @@ #include "Turnouts.h" #include "Sensors.h" #include "Outputs.h" -#include "RMFT.h" +#include "EXRAIL.h" #include "CommandDistributor.h" #endif diff --git a/RMFT.h b/EXRAIL.h similarity index 71% rename from RMFT.h rename to EXRAIL.h index 98ef2cb..575ab05 100644 --- a/RMFT.h +++ b/EXRAIL.h @@ -1,8 +1,8 @@ -#ifndef RMFT_H -#define RMFT_H +#ifndef EXRAIL_H +#define EXRAIL_H -#if defined(RMFT_ACTIVE) - #include "RMFT2.h" +#if defined(EXRAIL_ACTIVE) + #include "EXRAIL2.h" class RMFT { public: @@ -10,7 +10,7 @@ static void inline loop() {RMFT2::loop();} }; - #include "RMFTMacros.h" + #include "EXRAILMacros.h" #else // Dummy RMFT diff --git a/RMFT2.cpp b/EXRAIL2.cpp similarity index 99% rename from RMFT2.cpp rename to EXRAIL2.cpp index dac96a6..af6f0a1 100644 --- a/RMFT2.cpp +++ b/EXRAIL2.cpp @@ -42,7 +42,7 @@ #include -#include "RMFT2.h" +#include "EXRAIL2.h" #include "DCC.h" #include "DCCWaveform.h" #include "DIAG.h" diff --git a/RMFT2.h b/EXRAIL2.h similarity index 99% rename from RMFT2.h rename to EXRAIL2.h index 97f9fdd..b44ada6 100644 --- a/RMFT2.h +++ b/EXRAIL2.h @@ -18,8 +18,8 @@ * You should have received a copy of the GNU General Public License * along with CommandStation. If not, see . */ -#ifndef RMFT2_H -#define RMFT2_H +#ifndef EXRAIL2_H +#define EXRAIL2_H #include "FSH.h" #include "IODevice.h" diff --git a/RMFT2MacroReset.h b/EXRAIL2MacroReset.h similarity index 100% rename from RMFT2MacroReset.h rename to EXRAIL2MacroReset.h diff --git a/RMFTMacros.h b/EXRAILMacros.h similarity index 97% rename from RMFTMacros.h rename to EXRAILMacros.h index 3e274f4..7efb445 100644 --- a/RMFTMacros.h +++ b/EXRAILMacros.h @@ -19,8 +19,8 @@ * along with CommandStation. If not, see . */ -#ifndef RMFTMacros_H -#define RMFTMacros_H +#ifndef EXRAILMacros_H +#define EXRAILMacros_H // remove normal code LCD & SERIAL macros (will be restored later) #undef LCD @@ -50,13 +50,13 @@ // CAUTION: The macros below are multiple passed over myAutomation.h // Pass 1 Implements aliases -#include "RMFT2MacroReset.h" +#include "EXRAIL2MacroReset.h" #undef ALIAS #define ALIAS(name,value) const int name=value; #include "myAutomation.h" // Pass 2 convert descriptions to withrottle format emitter function -#include "RMFT2MacroReset.h" +#include "EXRAIL2MacroReset.h" #undef ROUTE #define ROUTE(id, description) emitRouteDescription(stream,'R',id,F(description)); #undef AUTOMATION @@ -67,7 +67,7 @@ void RMFT2::emitWithrottleDescriptions(Print * stream) { } // Pass 3... Create Text sending functions -#include "RMFT2MacroReset.h" +#include "EXRAIL2MacroReset.h" const int StringMacroTracker1=__COUNTER__; #undef PRINT #define PRINT(msg) case (__COUNTER__ - StringMacroTracker1) : printMessage2(F(msg));break; @@ -93,7 +93,7 @@ void RMFT2::printMessage(uint16_t id) { // Pass 4: Turnout descriptions (optional) -#include "RMFT2MacroReset.h" +#include "EXRAIL2MacroReset.h" #undef TURNOUT #define TURNOUT(id,addr,subaddr,description...) case id: desc=F("" description); break; #undef PIN_TURNOUT @@ -112,7 +112,7 @@ void RMFT2::emitTurnoutDescription(Print* stream,int16_t turnoutid) { } // Pass 5: Roster names (count) -#include "RMFT2MacroReset.h" +#include "EXRAIL2MacroReset.h" #undef ROSTER #define ROSTER(cabid,name,funcmap...) +1 @@ -121,7 +121,7 @@ const byte RMFT2::rosterNameCount=0 ; // Pass 6: Roster names emitter -#include "RMFT2MacroReset.h" +#include "EXRAIL2MacroReset.h" #undef ROSTER #define ROSTER(cabid,name,funcmap...) StringFormatter::send(stream,(FSH *)format,F(name),cabid,cabid<128?'S':'L'); void RMFT2::emitWithrottleRoster(Print * stream) { @@ -133,7 +133,7 @@ void RMFT2::emitWithrottleRoster(Print * stream) { } // Pass 7: functions getter -#include "RMFT2MacroReset.h" +#include "EXRAIL2MacroReset.h" #undef ROSTER #define ROSTER(cabid,name,funcmap...) case cabid: return F("" funcmap); const FSH * RMFT2::getRosterFunctions(int16_t cabid) { @@ -144,7 +144,7 @@ const FSH * RMFT2::getRosterFunctions(int16_t cabid) { } // Pass 8 Signal definitions -#include "RMFT2MacroReset.h" +#include "EXRAIL2MacroReset.h" #undef SIGNAL #define SIGNAL(redpin,amberpin,greenpin) redpin,amberpin,greenpin, const FLASH int16_t RMFT2::SignalDefinitions[] = { @@ -154,7 +154,7 @@ const FLASH int16_t RMFT2::SignalDefinitions[] = { // Last Pass : create main routes table // Only undef the macros, not dummy them. #define RMFT2_UNDEF_ONLY -#include "RMFT2MacroReset.h" +#include "EXRAIL2MacroReset.h" // Define internal helper macros. // Everything we generate here has to be compile-time evaluated to // a constant. diff --git a/Turnouts.cpp b/Turnouts.cpp index e4aec20..ff4ecb0 100644 --- a/Turnouts.cpp +++ b/Turnouts.cpp @@ -30,7 +30,7 @@ #endif #include "StringFormatter.h" #include "CommandDistributor.h" -#include "RMFT2.h" +#include "EXRAIL2.h" #include "Turnouts.h" #include "DCC.h" #include "LCN.h" diff --git a/WiThrottle.cpp b/WiThrottle.cpp index af6dbff..53e956c 100644 --- a/WiThrottle.cpp +++ b/WiThrottle.cpp @@ -53,7 +53,7 @@ #include "DIAG.h" #include "GITHUB_SHA.h" #include "version.h" -#include "RMFT2.h" +#include "EXRAIL2.h" #include "CommandDistributor.h" #define LOOPLOCOS(THROTTLECHAR, CAB) for (int loco=0;loconext()){ int id=tt->getId(); StringFormatter::send(stream,F("]\\[%d}|{"), id); -#ifdef RMFT_ACTIVE +#ifdef EXRAIL_ACTIVE RMFT2::emitTurnoutDescription(stream,id); #else StringFormatter::send(stream,F("%d"), id); @@ -133,7 +133,7 @@ void WiThrottle::parse(RingStream * stream, byte * cmdx) { } else if (!exRailSent) { - // Send ExRail routes list if not already sent (but not at same time as turnouts above) + // Send EX-RAIL routes list if not already sent (but not at same time as turnouts above) exRailSent=true; #ifdef RMFT_ACTIVE RMFT2::emitWithrottleRouteList(stream); @@ -156,7 +156,7 @@ void WiThrottle::parse(RingStream * stream, byte * cmdx) { DCCWaveform::progTrack.setPowerMode(cmd[3]=='1'?POWERMODE::ON:POWERMODE::OFF); CommandDistributor::broadcastPower(); } -#if defined(RMFT_ACTIVE) +#if defined(EXRAIL_ACTIVE) else if (cmd[1]=='R' && cmd[2]=='A' && cmd[3]=='2' ) { // Route activate // exrail routes are RA2Rn , Animations are RA2An int route=getInt(cmd+5); @@ -287,7 +287,7 @@ void WiThrottle::multithrottle(RingStream * stream, byte * cmd){ int fkeys=29; myLocos[loco].functionToggles=1<<2; // F2 (HORN) is a non-toggle -#ifdef RMFT_ACTIVE +#ifdef EXRAIL_ACTIVE const char * functionNames=(char *) RMFT2::getRosterFunctions(locoid); if (!functionNames) { // no roster, use presets as above diff --git a/defines.h b/defines.h index 01a8075..67dbc96 100644 --- a/defines.h +++ b/defines.h @@ -81,7 +81,7 @@ #if __has_include ( "myAutomation.h") #if defined(BIG_RAM) || defined(DISABLE_EEPROM) - #define RMFT_ACTIVE + #define EXRAIL_ACTIVE #else #define EXRAIL_WARNING #endif diff --git a/myAutomation.example.h b/myAutomation.example.h index 9ba9e20..f1bad26 100644 --- a/myAutomation.example.h +++ b/myAutomation.example.h @@ -1,5 +1,5 @@ /* This is an automation example file. - * The presence of a file calle "myAutomation.h" brings EX-RAIL code into + * The presence of a file called "myAutomation.h" brings EX-RAIL code into * the command station. * The auotomation may have multiple concurrent tasks. * A task may diff --git a/myAutomation2.h b/myAutomation2.h index 84f67be..d660a28 100644 --- a/myAutomation2.h +++ b/myAutomation2.h @@ -1,6 +1,6 @@ /* This is an automation example file. - * The presence of a file calle "myAutomation.h" brings EX-RAIL code into + * The presence of a file called "myAutomation.h" brings EX-RAIL code into * the command station. * The auotomation may have multiple concurrent tasks. * A task may drive one loco through a ROUTE or may simply