mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-04-22 13:01:19 +02:00
Compare commits
3 Commits
a610e83f6e
...
6689a1d35f
Author | SHA1 | Date | |
---|---|---|---|
|
6689a1d35f | ||
|
91818ed80c | ||
|
86310aea4f |
@ -1145,7 +1145,7 @@ void RMFT2::kill(const FSH * reason, int operand) {
|
||||
|
||||
int16_t RMFT2::getSignalSlot(int16_t id) {
|
||||
|
||||
if (id > 0) {
|
||||
if (id >= 0) {
|
||||
int sigslot = 0;
|
||||
int16_t sighandle = 0;
|
||||
// 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
|
||||
// but for a servo signal it will also have SERVO_SIGNAL_FLAG set.
|
||||
VPIN sigid = sighandle & SIGNAL_ID_MASK;
|
||||
if (sigid == (VPIN)id)
|
||||
if (sigid == (VPIN)id) // cast to keep compiler happy but id is positive
|
||||
return sigslot; // found it
|
||||
sigslot++; // keep looking
|
||||
};
|
||||
}
|
||||
// We did not find the signal
|
||||
// If we got here, we did not find the signal
|
||||
DIAG(F("EXRAIL Signal %d not defined"), id);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
#define GITHUB_SHA "devel-202404211704Z"
|
||||
#define GITHUB_SHA "devel-202404091507Z"
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#define APPLY_BY_MODE(findmode,function) \
|
||||
FOR_EACH_TRACK(t) \
|
||||
if (track[t]->getMode()==findmode) \
|
||||
if (track[t]->getMode() & findmode) \
|
||||
track[t]->function;
|
||||
|
||||
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>
|
||||
return setTrackMode(p[0], track[p[0]]->getMode() | TRACK_MODE_AUTOINV);
|
||||
|
||||
if (params==2 && p[1]=="INV"_hk) // <= id AUTO>
|
||||
if (params==2 && p[1]=="INV"_hk) // <= id 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>
|
||||
|
@ -3,7 +3,8 @@
|
||||
|
||||
#include "StringFormatter.h"
|
||||
|
||||
#define VERSION "5.2.56"
|
||||
#define VERSION "5.2.57"
|
||||
// 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.55 - Move EXRAIL isSignal() to public to allow use in STEALTH call
|
||||
// 5.2.54 - Bugfix for EXRAIL signal handling for active high
|
||||
|
Loading…
x
Reference in New Issue
Block a user