1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-04-23 05:21:20 +02:00

Compare commits

..

No commits in common. "6689a1d35fc2927f0e5aa1da99525cc8b2b0bf82" and "a610e83f6ec4e1c943d06f63b913ec802f1723e2" have entirely different histories.

4 changed files with 10 additions and 11 deletions

View File

@ -1145,7 +1145,7 @@ void RMFT2::kill(const FSH * reason, int operand) {
int16_t RMFT2::getSignalSlot(int16_t id) { int16_t RMFT2::getSignalSlot(int16_t id) {
if (id >= 0) { if (id > 0) {
int sigslot = 0; int sigslot = 0;
int16_t sighandle = 0; int16_t sighandle = 0;
// Trundle down the signal list until we reach the end // Trundle down the signal list until we reach the end
@ -1155,12 +1155,12 @@ int16_t RMFT2::getSignalSlot(int16_t id) {
// for a LED signal it will be same as redpin // for a LED signal it will be same as redpin
// but for a servo signal it will also have SERVO_SIGNAL_FLAG set. // but for a servo signal it will also have SERVO_SIGNAL_FLAG set.
VPIN sigid = sighandle & SIGNAL_ID_MASK; VPIN sigid = sighandle & SIGNAL_ID_MASK;
if (sigid == (VPIN)id) // cast to keep compiler happy but id is positive if (sigid == (VPIN)id)
return sigslot; // found it return sigslot; // found it
sigslot++; // keep looking sigslot++; // keep looking
}; };
} }
// If we got here, we did not find the signal // We did not find the signal
DIAG(F("EXRAIL Signal %d not defined"), id); DIAG(F("EXRAIL Signal %d not defined"), id);
return -1; return -1;
} }

View File

@ -1 +1 @@
#define GITHUB_SHA "devel-202404091507Z" #define GITHUB_SHA "devel-202404211704Z"

View File

@ -35,7 +35,7 @@
#define APPLY_BY_MODE(findmode,function) \ #define APPLY_BY_MODE(findmode,function) \
FOR_EACH_TRACK(t) \ FOR_EACH_TRACK(t) \
if (track[t]->getMode() & findmode) \ if (track[t]->getMode()==findmode) \
track[t]->function; track[t]->function;
MotorDriver * TrackManager::track[MAX_TRACKS] = { NULL }; MotorDriver * TrackManager::track[MAX_TRACKS] = { NULL };
@ -398,7 +398,7 @@ bool TrackManager::parseEqualSign(Print *stream, int16_t params, int16_t p[])
if (params==2 && p[1]=="AUTO"_hk) // <= id AUTO> if (params==2 && p[1]=="AUTO"_hk) // <= id AUTO>
return setTrackMode(p[0], track[p[0]]->getMode() | TRACK_MODE_AUTOINV); return setTrackMode(p[0], track[p[0]]->getMode() | TRACK_MODE_AUTOINV);
if (params==2 && p[1]=="INV"_hk) // <= id INV> if (params==2 && p[1]=="INV"_hk) // <= id AUTO>
return setTrackMode(p[0], track[p[0]]->getMode() | TRACK_MODE_INV); return setTrackMode(p[0], track[p[0]]->getMode() | TRACK_MODE_INV);
if (params==3 && p[1]=="DC"_hk && p[2]>0) // <= id DC cab> if (params==3 && p[1]=="DC"_hk && p[2]>0) // <= id DC cab>

View File

@ -3,8 +3,7 @@
#include "StringFormatter.h" #include "StringFormatter.h"
#define VERSION "5.2.57" #define VERSION "5.2.56"
// 5.2.57 - Bugfix autoreverse: Apply mode by binart bit match and not by equality
// 5.2.56 - Bugfix and refactor for EXRAIL getSignalSlot // 5.2.56 - Bugfix and refactor for EXRAIL getSignalSlot
// 5.2.55 - Move EXRAIL isSignal() to public to allow use in STEALTH call // 5.2.55 - Move EXRAIL isSignal() to public to allow use in STEALTH call
// 5.2.54 - Bugfix for EXRAIL signal handling for active high // 5.2.54 - Bugfix for EXRAIL signal handling for active high