mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 05:11:24 +01:00
Merge branch 'devel' of https://github.com/DCC-EX/CommandStation-EX into devel
This commit is contained in:
commit
3317b4666e
@ -1 +1 @@
|
|||||||
#define GITHUB_SHA "devel-202404051830Z"
|
#define GITHUB_SHA "devel-202404061747Z"
|
||||||
|
@ -38,8 +38,8 @@
|
|||||||
if (track[t]->getMode()==findmode) \
|
if (track[t]->getMode()==findmode) \
|
||||||
track[t]->function;
|
track[t]->function;
|
||||||
|
|
||||||
MotorDriver * TrackManager::track[MAX_TRACKS];
|
MotorDriver * TrackManager::track[MAX_TRACKS] = { NULL };
|
||||||
int16_t TrackManager::trackDCAddr[MAX_TRACKS];
|
int16_t TrackManager::trackDCAddr[MAX_TRACKS] = { 0 };
|
||||||
|
|
||||||
int8_t TrackManager::lastTrack=-1;
|
int8_t TrackManager::lastTrack=-1;
|
||||||
bool TrackManager::progTrackSyncMain=false;
|
bool TrackManager::progTrackSyncMain=false;
|
||||||
@ -251,7 +251,6 @@ bool TrackManager::setTrackMode(byte trackToSet, TRACK_MODE mode, int16_t dcAddr
|
|||||||
} else {
|
} else {
|
||||||
track[trackToSet]->makeProgTrack(false); // only the prog track knows it's type
|
track[trackToSet]->makeProgTrack(false); // only the prog track knows it's type
|
||||||
}
|
}
|
||||||
track[trackToSet]->setMode(mode);
|
|
||||||
|
|
||||||
// When a track is switched, we must clear any side effects of its previous
|
// When a track is switched, we must clear any side effects of its previous
|
||||||
// state, otherwise trains run away or just dont move.
|
// state, otherwise trains run away or just dont move.
|
||||||
@ -259,8 +258,13 @@ bool TrackManager::setTrackMode(byte trackToSet, TRACK_MODE mode, int16_t dcAddr
|
|||||||
// This can be done BEFORE the PWM-Timer evaluation (methinks)
|
// This can be done BEFORE the PWM-Timer evaluation (methinks)
|
||||||
if (mode & TRACK_MODE_DC) {
|
if (mode & TRACK_MODE_DC) {
|
||||||
if (trackDCAddr[trackToSet] != dcAddr) {
|
if (trackDCAddr[trackToSet] != dcAddr) {
|
||||||
// if we change dcAddr, detach first old signal
|
// new or changed DC Addr, run the new setup
|
||||||
|
if (trackDCAddr[trackToSet] != 0) {
|
||||||
|
// if we change dcAddr and not only
|
||||||
|
// change from another mode,
|
||||||
|
// first detach old DC signal
|
||||||
track[trackToSet]->detachDCSignal();
|
track[trackToSet]->detachDCSignal();
|
||||||
|
}
|
||||||
#ifdef ARDUINO_ARCH_ESP32
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
int trackfound = -1;
|
int trackfound = -1;
|
||||||
FOR_EACH_TRACK(t) {
|
FOR_EACH_TRACK(t) {
|
||||||
@ -285,7 +289,9 @@ bool TrackManager::setTrackMode(byte trackToSet, TRACK_MODE mode, int16_t dcAddr
|
|||||||
// DCC tracks need to have set the PWM to zero or they will not work.
|
// DCC tracks need to have set the PWM to zero or they will not work.
|
||||||
track[trackToSet]->detachDCSignal();
|
track[trackToSet]->detachDCSignal();
|
||||||
track[trackToSet]->setBrake(false);
|
track[trackToSet]->setBrake(false);
|
||||||
|
trackDCAddr[trackToSet]=0; // clear that an addr is set for DC as this is not a DC track
|
||||||
}
|
}
|
||||||
|
track[trackToSet]->setMode(mode);
|
||||||
|
|
||||||
// BOOST:
|
// BOOST:
|
||||||
// Leave it as is
|
// Leave it as is
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
|
|
||||||
#include "StringFormatter.h"
|
#include "StringFormatter.h"
|
||||||
|
|
||||||
#define VERSION "5.2.44"
|
#define VERSION "5.2.45"
|
||||||
// 5.2.44 - ESP32 fix PWM LEDC inverted pin mode
|
// 5.2.45 - ESP32 Trackmanager reset cab number to 0 when track is not DC
|
||||||
|
// ESP32 fix PWM LEDC inverted pin mode
|
||||||
// ESP32 rewrite PWM LEDC to use pin mux
|
// ESP32 rewrite PWM LEDC to use pin mux
|
||||||
// 5.2.42 - ESP32 Bugfix: Uninitialized stack variable
|
// 5.2.42 - ESP32 Bugfix: Uninitialized stack variable
|
||||||
// 5.2.41 - Update rotary encoder default address to 0x67
|
// 5.2.41 - Update rotary encoder default address to 0x67
|
||||||
|
Loading…
Reference in New Issue
Block a user