diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index 2e1a1a1..c3895f7 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -79,6 +79,8 @@ const int16_t HASH_KEYWORD_TT=2688; const int16_t HASH_KEYWORD_VPIN=-415; const int16_t HASH_KEYWORD_A='A'; const int16_t HASH_KEYWORD_C='C'; +const int16_t HASH_KEYWORD_G='G'; +const int16_t HASH_KEYWORD_I='I'; const int16_t HASH_KEYWORD_R='R'; const int16_t HASH_KEYWORD_T='T'; const int16_t HASH_KEYWORD_X='X'; @@ -503,14 +505,6 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream) case 'c': // SEND METER RESPONSES // No longer supported because of multiple tracks See and break; - - case 'G': // Track current gauge limits - TrackManager::reportGauges(stream); // - return; - - case 'I': // Track current - TrackManager::reportCurrent(stream); // - return; case 'Q': // SENSORS Sensor::printAll(stream); @@ -591,6 +585,16 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream) } CommandDistributor::setClockTime(p[1], p[2], 1); return; + + case HASH_KEYWORD_G: // current gauge limits + if (params>1) break; + TrackManager::reportGauges(stream); // + return; + + case HASH_KEYWORD_I: // current values + if (params>1) break; + TrackManager::reportCurrent(stream); // + return; case HASH_KEYWORD_A: // returns automations/routes StringFormatter::send(stream, F(" is actually read as + - Keyword parameters are shown in upper case but may be entered in mixed case. + - value parameters are numeric. + - [something] indicates its optional. + - Not all commands have a response, and not all responses come from the last commands that you have issued. + +Startup status + + +Track power management +<1> +<1 MAIN|PROG|JOIN> +<0> +<0 MAIN|PROG> + +Basic manual control + + + + + +DCC accessory control + + + + +Turnout definition +Note: Turnouts are best defined in myAutomation.h where a turnout description can also be provided ( refer to EXRAIL documentation) or by using these commands in a mySetup.h file. + + + + + + + +Outputs + + + +Sensors + + +Decoder programming + + + + + + + + + + + + + +Advanced DCC control + +

+ +<#> +<-> +<- cabid> + + + + + +EEPROM commands +These commands exist for +backwards JMRI compatibility. +You are strongly discouraged from maintaining your configuration settings in EEPROM. + + + + + + + + + + +Diagnostic commands + + + + + + + + + + + +<+ cmd> +<+> + + +User defined filter commands + + + +Track Management +<=> +<= track DCC|PROG|OFF> +<= track DC|DCX cabid> + + + + +Turntable interface + + +Fast clock interface + + + + +Advanced Throttle access to features + + + + + + + + +******************* +EXRAIL Commands +******************* + + + + + + + + + + + + +Obsolete commands/formats + + + + + + + + +Broadcast responses +Note: broadcasts are sent to all throttles when appropriate (usually because something has changed) + + + + + + + + + +Diagnostic responses +These are not meant to be software readable. They contain diagnostic information for programmers to identify issues. + +<* ... *> + diff --git a/TrackManager.cpp b/TrackManager.cpp index f07415b..8521889 100644 --- a/TrackManager.cpp +++ b/TrackManager.cpp @@ -425,7 +425,7 @@ POWERMODE TrackManager::getProgPower() { } void TrackManager::reportCurrent(Print* stream) { - StringFormatter::send(stream,F("getPower()==POWERMODE::OVERLOAD) ? -1 : @@ -435,7 +435,7 @@ void TrackManager::reportCurrent(Print* stream) { } void TrackManager::reportGauges(Print* stream) { - StringFormatter::send(stream,F("raw2mA(track[t]->getRawCurrentTripValue()));