From bba74a08f6710dc59457f3fafcdd19ce127c1d0e Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sun, 31 Dec 2023 13:22:42 +0100 Subject: [PATCH] Do not support obsolete on memory tight arch --- DCCEXParser.cpp | 3 ++- TrackManager.cpp | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index aefed4c..0c4a4d8 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -625,12 +625,13 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream) DCC::setThrottle(0,1,1); // this broadcasts speed 1(estop) and sets all reminders to speed 1. return; +#ifdef HAVE_ENOUGH_MEMORY case 'c': // SEND METER RESPONSES // No longer useful because of multiple tracks See and if (params>0) break; TrackManager::reportObsoleteCurrent(stream); return; - +#endif case 'Q': // SENSORS Sensor::printAll(stream); return; diff --git a/TrackManager.cpp b/TrackManager.cpp index e2d4d27..1e2f88d 100644 --- a/TrackManager.cpp +++ b/TrackManager.cpp @@ -574,14 +574,15 @@ bool TrackManager::getPower(byte t, char s[]) { return false; } - void TrackManager::reportObsoleteCurrent(Print* stream) { // This function is for backward JMRI compatibility only // It reports the first track only, as main, regardless of track settings. // +#ifdef HAVE_ENOUGH_MEMORY int maxCurrent=track[0]->raw2mA(track[0]->getRawCurrentTripValue()); StringFormatter::send(stream, F("\n"), - track[0]->raw2mA(track[0]->getCurrentRaw(false)), maxCurrent, maxCurrent); + track[0]->raw2mA(track[0]->getCurrentRaw(false)), maxCurrent, maxCurrent); +#endif } void TrackManager::reportCurrent(Print* stream) {