mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-04-21 12:31:19 +02:00
Compare commits
5 Commits
9f3354c687
...
d1daf41f12
Author | SHA1 | Date | |
---|---|---|---|
|
d1daf41f12 | ||
|
6bfa7028c4 | ||
|
a5d1d04882 | ||
|
bd6e426499 | ||
|
09bae44cc0 |
@ -78,11 +78,17 @@ int DCCTimer::freeMemory() {
|
|||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
#ifdef ARDUINO_ARCH_ESP32
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
|
|
||||||
|
#if __has_include("esp_idf_version.h")
|
||||||
#include "esp_idf_version.h"
|
#include "esp_idf_version.h"
|
||||||
#if ESP_IDF_VERSION_MAJOR > 4
|
#endif
|
||||||
|
#if ESP_IDF_VERSION_MAJOR == 4
|
||||||
|
// all well correct IDF version
|
||||||
|
#else
|
||||||
#error "DCC-EX does not support compiling with IDF version 5.0 or later. Downgrade your ESP32 library to a version that contains IDF version 4. Arduino ESP32 library 3.0.0 is too new. Downgrade to one of 2.0.9 to 2.0.17"
|
#error "DCC-EX does not support compiling with IDF version 5.0 or later. Downgrade your ESP32 library to a version that contains IDF version 4. Arduino ESP32 library 3.0.0 is too new. Downgrade to one of 2.0.9 to 2.0.17"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// protect all the rest of the code from IDF version 5
|
||||||
|
#if ESP_IDF_VERSION_MAJOR == 4
|
||||||
#include "DIAG.h"
|
#include "DIAG.h"
|
||||||
#include <driver/adc.h>
|
#include <driver/adc.h>
|
||||||
#include <soc/sens_reg.h>
|
#include <soc/sens_reg.h>
|
||||||
@ -322,5 +328,5 @@ void ADCee::scan() {
|
|||||||
|
|
||||||
void ADCee::begin() {
|
void ADCee::begin() {
|
||||||
}
|
}
|
||||||
|
#endif //IDF v4
|
||||||
#endif //ESP32
|
#endif //ESP32
|
||||||
|
@ -931,8 +931,9 @@ void RMFT2::loop2() {
|
|||||||
|
|
||||||
#ifndef DISABLE_PROG
|
#ifndef DISABLE_PROG
|
||||||
case OPCODE_JOIN:
|
case OPCODE_JOIN:
|
||||||
TrackManager::setPower(POWERMODE::ON);
|
|
||||||
TrackManager::setJoin(true);
|
TrackManager::setJoin(true);
|
||||||
|
TrackManager::setMainPower(POWERMODE::ON);
|
||||||
|
TrackManager::setProgPower(POWERMODE::ON);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPCODE_UNJOIN:
|
case OPCODE_UNJOIN:
|
||||||
|
@ -668,7 +668,8 @@ void TrackManager::setJoin(bool joined) {
|
|||||||
if (track[t]->getMode() & TRACK_MODE_PROG) { // find PROG track
|
if (track[t]->getMode() & TRACK_MODE_PROG) { // find PROG track
|
||||||
tempProgTrack = t; // remember PROG track
|
tempProgTrack = t; // remember PROG track
|
||||||
setTrackMode(t, TRACK_MODE_MAIN);
|
setTrackMode(t, TRACK_MODE_MAIN);
|
||||||
track[t]->setPower(POWERMODE::ON); // if joined, always on
|
// setPower() of the track called after
|
||||||
|
// seperately after setJoin() instead
|
||||||
break; // there is only one prog track, done
|
break; // there is only one prog track, done
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -680,8 +681,6 @@ void TrackManager::setJoin(bool joined) {
|
|||||||
setTrackMode(tempProgTrack, TRACK_MODE_PROG); // set track mode back to prog
|
setTrackMode(tempProgTrack, TRACK_MODE_PROG); // set track mode back to prog
|
||||||
track[tempProgTrack]->setPower(tPTmode); // set power status as it was before
|
track[tempProgTrack]->setPower(tPTmode); // set power status as it was before
|
||||||
tempProgTrack = MAX_TRACKS+1;
|
tempProgTrack = MAX_TRACKS+1;
|
||||||
} else {
|
|
||||||
DIAG(F("Unjoin but no remembered prog track"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -500,9 +500,9 @@ void WiThrottle::getLocoCallback(int16_t locoid) {
|
|||||||
char addcmd[20]={'M',stashThrottleChar,'+', addrchar};
|
char addcmd[20]={'M',stashThrottleChar,'+', addrchar};
|
||||||
itoa(locoid,addcmd+4,10);
|
itoa(locoid,addcmd+4,10);
|
||||||
stashInstance->multithrottle(stashStream, (byte *)addcmd);
|
stashInstance->multithrottle(stashStream, (byte *)addcmd);
|
||||||
|
TrackManager::setJoin(true); // <1 JOIN> so we can drive loco away
|
||||||
TrackManager::setMainPower(POWERMODE::ON);
|
TrackManager::setMainPower(POWERMODE::ON);
|
||||||
TrackManager::setProgPower(POWERMODE::ON);
|
TrackManager::setProgPower(POWERMODE::ON);
|
||||||
TrackManager::setJoin(true); // <1 JOIN> so we can drive loco away
|
|
||||||
DIAG(F("LocoCallback commit success"));
|
DIAG(F("LocoCallback commit success"));
|
||||||
stashStream->commit();
|
stashStream->commit();
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
|
|
||||||
#include "StringFormatter.h"
|
#include "StringFormatter.h"
|
||||||
|
|
||||||
#define VERSION "5.4.4"
|
#define VERSION "5.4.5"
|
||||||
|
// 5.4.5 - ESP32: Better detection of correct IDF version
|
||||||
|
// - track power is always turned on after setJoin() not by setJoin()
|
||||||
// 5.4.4 - bugfix in parser, input buffer overrun and trailing > that did break <+>
|
// 5.4.4 - bugfix in parser, input buffer overrun and trailing > that did break <+>
|
||||||
// 5.4.3 - bugfix changeFn for functions 29..31
|
// 5.4.3 - bugfix changeFn for functions 29..31
|
||||||
// 5.4.2 - Reversed turnout bugfix
|
// 5.4.2 - Reversed turnout bugfix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user