Rename RMFT files and references to EXRAIL (#201)

Make naming consistent with our marketing of ex-rail for files and defines

* Rename RMFT.h to EXRAIL.h

* Rename RMFT2.cpp to EXRAIL2.cpp

* Rename RMFT2.h to EXRAIL2.h

* Rename RMFT2MacroReset.h to EXRAIL2MacroReset.h

* Rename RMFTMacros.h to EXRAILMacros.h

* Rename RMFT references to EXRAIL
This commit is contained in:
Fred 2022-01-30 12:31:26 -05:00 committed by GitHub
parent 05545321a9
commit bd7c8bf78e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 32 additions and 32 deletions

View File

@ -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();

View File

@ -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
}

View File

@ -43,7 +43,7 @@
#include "Turnouts.h"
#include "Sensors.h"
#include "Outputs.h"
#include "RMFT.h"
#include "EXRAIL.h"
#include "CommandDistributor.h"
#endif

View File

@ -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

View File

@ -42,7 +42,7 @@
#include <Arduino.h>
#include "RMFT2.h"
#include "EXRAIL2.h"
#include "DCC.h"
#include "DCCWaveform.h"
#include "DIAG.h"

View File

@ -18,8 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with CommandStation. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef RMFT2_H
#define RMFT2_H
#ifndef EXRAIL2_H
#define EXRAIL2_H
#include "FSH.h"
#include "IODevice.h"

View File

@ -19,8 +19,8 @@
* along with CommandStation. If not, see <https://www.gnu.org/licenses/>.
*/
#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.

View File

@ -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"

View File

@ -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;loco<MAX_MY_LOCO;loco++) \
@ -121,7 +121,7 @@ void WiThrottle::parse(RingStream * stream, byte * cmdx) {
for(Turnout *tt=Turnout::first();tt!=NULL;tt=tt->next()){
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

View File

@ -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

View File

@ -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

View File

@ -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