1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

Improved error msg

This commit is contained in:
Asbelos 2021-12-16 11:23:34 +00:00
parent 6bfe18bb21
commit 0eacda0cf9

View File

@ -51,9 +51,6 @@
#include "version.h" #include "version.h"
#include "RMFT2.h" #include "RMFT2.h"
#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
#define LOOPLOCOS(THROTTLECHAR, CAB) for (int loco=0;loco<MAX_MY_LOCO;loco++) \ #define LOOPLOCOS(THROTTLECHAR, CAB) for (int loco=0;loco<MAX_MY_LOCO;loco++) \
if ((myLocos[loco].throttle==THROTTLECHAR || '*'==THROTTLECHAR) && (CAB<0 || myLocos[loco].cab==CAB)) if ((myLocos[loco].throttle==THROTTLECHAR || '*'==THROTTLECHAR) && (CAB<0 || myLocos[loco].cab==CAB))
@ -480,7 +477,7 @@ void WiThrottle::getLocoCallback(int16_t locoid) {
} else } else
addrchar = 'S'; addrchar = 'S';
if (addrchar == 'L' && locoid <= HIGHEST_SHORT_ADDR ) if (addrchar == 'L' && locoid <= HIGHEST_SHORT_ADDR )
StringFormatter::send(stashStream,F("HMLong addr <= " STR(HIGHEST_SHORT_ADDR) " not supported\n")); StringFormatter::send(stashStream,F("HMLong addr %d <= %d not supported\n"), locoid,HIGHEST_SHORT_ADDR);
else { else {
char addcmd[20]={'M',stashThrottleChar,'+', addrchar}; char addcmd[20]={'M',stashThrottleChar,'+', addrchar};
itoa(locoid,addcmd+4,10); itoa(locoid,addcmd+4,10);