diff --git a/CVReader.ino b/CVReader.ino index ccea2d3..194b447 100644 --- a/CVReader.ino +++ b/CVReader.ino @@ -1,6 +1,6 @@ #include "DCC.h" #include "DIAG.h" -#include "JMRIParser.h" +#include "DCCEXParser.h" /* this code is here to test the waveforwe generator and reveal the issues involved in programming track operations. @@ -37,6 +37,6 @@ void setup() { void loop() { DCC::loop(); // required to keep locos running and check powwer - // This line passes input on Serial to the JMRIparser - StringParser::loop(Serial, JMRIParser::parse); + // This line passes input on Serial to the DCCEXParser + StringParser::loop(Serial, DCCEXParser::parse); } diff --git a/JMRIParser.cpp b/DCCEXParser.cpp similarity index 97% rename from JMRIParser.cpp rename to DCCEXParser.cpp index 699a22c..ad2aadb 100644 --- a/JMRIParser.cpp +++ b/DCCEXParser.cpp @@ -1,5 +1,5 @@ #include "StringParser.h" -#include "JMRIParser.h" +#include "DCCEXParser.h" #include "DCC.h" #include "DCCWaveform.h" #include "Turnouts.h" @@ -19,7 +19,8 @@ const char VERSION[]="99.666"; // See documentation on DCC class for info on this section -void JMRIParser::parse(Stream & stream,const char *com) { +void DCCEXParser::parse(Stream & stream,const char *com) { + (void) EEPROM; // tell compiler not to warn thi is unused int p[MAX_PARAMS]; bool result; int params=StringParser::parse(com+1,p,MAX_PARAMS); @@ -296,7 +297,7 @@ void JMRIParser::parse(Stream & stream,const char *com) { -bool JMRIParser::parseZ(Stream & stream, int params, int p[]){ +bool DCCEXParser::parseZ(Stream & stream, int params, int p[]){ /* * : sets output ID to either the "active" or "inactive" state * @@ -340,7 +341,7 @@ bool JMRIParser::parseZ(Stream & stream, int params, int p[]){ //=================================== -bool JMRIParser::parseT(Stream & stream, int params, int p[]) { +bool DCCEXParser::parseT(Stream & stream, int params, int p[]) { switch(params){ case 0: // Turnout::showAll(stream); // verbose show @@ -365,7 +366,7 @@ bool JMRIParser::parseT(Stream & stream, int params, int p[]) { return true; } -bool JMRIParser::parseS(Stream & stream, int params, int p[]) { +bool DCCEXParser::parseS(Stream & stream, int params, int p[]) { switch(params){ diff --git a/JMRIParser.h b/DCCEXParser.h similarity index 86% rename from JMRIParser.h rename to DCCEXParser.h index 72d6923..83310c3 100644 --- a/JMRIParser.h +++ b/DCCEXParser.h @@ -1,6 +1,6 @@ -#ifndef JMRIParser_h -#define JMRIParser_h -struct JMRIParser +#ifndef DCCEXParser_h +#define DCCEXParser_h +struct DCCEXParser { static void parse(Stream & stream,const char * command); diff --git a/Hardware.cpp b/Hardware.cpp index 6c5932c..5111679 100644 --- a/Hardware.cpp +++ b/Hardware.cpp @@ -43,7 +43,6 @@ int Hardware::getCurrentMilliamps(bool isMainTrack) { int pin = isMainTrack ? MAIN_SENSE_PIN : PROG_SENSE_PIN; float factor = isMainTrack ? MAIN_SENSE_FACTOR : PROG_SENSE_FACTOR; int rawCurrent = analogRead(pin); - // DIAG(F("\nCurrent on %d pin %d = %d"),isMainTrack,pin,rawCurrent); return (int)(rawCurrent * factor); }