mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 21:01:25 +01:00
EX-RAIL bugfix: Could not read long loco addrs
This commit is contained in:
parent
ad6c1384c9
commit
02ed7828c1
10
EXRAIL2.cpp
10
EXRAIL2.cpp
@ -518,7 +518,15 @@ bool RMFT2::skipIfBlock() {
|
|||||||
|
|
||||||
|
|
||||||
/* static */ void RMFT2::readLocoCallback(int16_t cv) {
|
/* static */ void RMFT2::readLocoCallback(int16_t cv) {
|
||||||
progtrackLocoId=cv;
|
if (cv & LONG_ADDR_MARKER) { // maker bit indicates long addr
|
||||||
|
progtrackLocoId = cv ^ LONG_ADDR_MARKER; // remove marker bit to get real long addr
|
||||||
|
if (progtrackLocoId <= HIGHEST_SHORT_ADDR ) { // out of range for long addr
|
||||||
|
DIAG(F("Long addr %d <= %d unsupported\n"), progtrackLocoId, HIGHEST_SHORT_ADDR);
|
||||||
|
progtrackLocoId = -1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
progtrackLocoId=cv;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RMFT2::loop() {
|
void RMFT2::loop() {
|
||||||
|
Loading…
Reference in New Issue
Block a user