1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-24 16:46:13 +01:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Harald Barth
44d8154223 version number update 2023-08-30 23:57:49 +02:00
Harald Barth
01919b33df Make parser more fool proof 2023-08-30 23:55:39 +02:00
Harald Barth
26ddd27ecf let user disable <D > command in favour for HAL on the Uno platform 2023-08-29 14:27:38 +02:00
4 changed files with 30 additions and 16 deletions

View File

@ -451,10 +451,14 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
#ifndef DISABLE_PROG #ifndef DISABLE_PROG
case 'w': // WRITE CV on MAIN <w CAB CV VALUE> case 'w': // WRITE CV on MAIN <w CAB CV VALUE>
if (params != 3)
break;
DCC::writeCVByteMain(p[0], p[1], p[2]); DCC::writeCVByteMain(p[0], p[1], p[2]);
return; return;
case 'b': // WRITE CV BIT ON MAIN <b CAB CV BIT VALUE> case 'b': // WRITE CV BIT ON MAIN <b CAB CV BIT VALUE>
if (params != 4)
break;
DCC::writeCVBitMain(p[0], p[1], p[2], p[3]); DCC::writeCVBitMain(p[0], p[1], p[2], p[3]);
return; return;
#endif #endif
@ -485,8 +489,10 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
DCC::setLocoId(p[0],callback_Wloco); DCC::setLocoId(p[0],callback_Wloco);
else if (params == 4) // WRITE CV ON PROG <W CV VALUE [CALLBACKNUM] [CALLBACKSUB]> else if (params == 4) // WRITE CV ON PROG <W CV VALUE [CALLBACKNUM] [CALLBACKSUB]>
DCC::writeCVByte(p[0], p[1], callback_W4); DCC::writeCVByte(p[0], p[1], callback_W4);
else // WRITE CV ON PROG <W CV VALUE> else if (params == 2) // WRITE CV ON PROG <W CV VALUE>
DCC::writeCVByte(p[0], p[1], callback_W); DCC::writeCVByte(p[0], p[1], callback_W);
else
break;
return; return;
case 'V': // VERIFY CV ON PROG <V CV VALUE> <V CV BIT 0|1> case 'V': // VERIFY CV ON PROG <V CV VALUE> <V CV BIT 0|1>
@ -506,7 +512,9 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
} }
break; break;
case 'B': // WRITE CV BIT ON PROG <B CV BIT VALUE CALLBACKNUM CALLBACKSUB> case 'B': // WRITE CV BIT ON PROG <B CV BIT VALUE CALLBACKNUM CALLBACKSUB> or <B CV BIT VALUE>
if (params != 3 && params != 5)
break;
if (!stashCallback(stream, p, ringStream)) if (!stashCallback(stream, p, ringStream))
break; break;
DCC::writeCVBit(p[0], p[1], p[2], callback_B); DCC::writeCVBit(p[0], p[1], p[2], callback_B);
@ -638,12 +646,12 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
case ' ': // < > case ' ': // < >
StringFormatter::send(stream, F("\n")); StringFormatter::send(stream, F("\n"));
return; return;
#ifndef DISABLE_DIAG
case 'D': // < > case 'D': // < >
if (parseD(stream, params, p)) if (parseD(stream, params, p))
return; return;
return; break;
#endif
case '=': // <= Track manager control > case '=': // <= Track manager control >
if (TrackManager::parseJ(stream, params, p)) if (TrackManager::parseJ(stream, params, p))
return; return;

View File

@ -1 +1 @@
#define GITHUB_SHA "devel-202308251713Z" #define GITHUB_SHA "devel-202308302157Z"

View File

@ -29,8 +29,13 @@
// Define symbol IO_NO_HAL to reduce FLASH footprint when HAL features not required // Define symbol IO_NO_HAL to reduce FLASH footprint when HAL features not required
// The HAL is disabled by default on Nano and Uno platforms, because of limited flash space. // The HAL is disabled by default on Nano and Uno platforms, because of limited flash space.
#include "defines.h"
#if defined(ARDUINO_AVR_NANO) || defined(ARDUINO_AVR_UNO) #if defined(ARDUINO_AVR_NANO) || defined(ARDUINO_AVR_UNO)
#define IO_NO_HAL #if defined(DISABLE_DIAG) && defined(DISABLE_EEPROM) && defined(DISABLE_PROG)
#warning you have sacrificed DIAG for HAL
#else
#define IO_NO_HAL
#endif
#endif #endif
// Define symbol IO_SWITCH_OFF_SERVO to set the PCA9685 output to 0 when an // Define symbol IO_SWITCH_OFF_SERVO to set the PCA9685 output to 0 when an

View File

@ -3,7 +3,8 @@
#include "StringFormatter.h" #include "StringFormatter.h"
#define VERSION "5.1.2" #define VERSION "5.1.3"
// 5.1.3 - Make parser more fool proof
// 5.1.2 - Bugfix: ESP32 30ms off time // 5.1.2 - Bugfix: ESP32 30ms off time
// 5.1.1 - Check bad AT firmware version // 5.1.1 - Check bad AT firmware version
// - Update IO_PCA9555.h reflecting IO_MCP23017.h changes to support PCA9548 mux // - Update IO_PCA9555.h reflecting IO_MCP23017.h changes to support PCA9548 mux