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

Compare commits

..

No commits in common. "9054d8d9f5e220b26bd224c2ca46e822addd1a7a" and "865f75dda4edf819662888b919aa65ec05945c9f" have entirely different histories.

2 changed files with 10 additions and 5 deletions

12
DCC.cpp
View File

@ -229,9 +229,15 @@ bool DCC::setFn( int cab, int16_t functionNumber, bool on) {
// Flip function state (used from withrottle protocol) // Flip function state (used from withrottle protocol)
void DCC::changeFn( int cab, int16_t functionNumber) { void DCC::changeFn( int cab, int16_t functionNumber) {
auto currentValue=getFn(cab,functionNumber); if (cab<=0 || functionNumber>31) return;
if (currentValue<0) return; // function not valid for change int reg = lookupSpeedTable(cab);
setFn(cab,functionNumber, currentValue?false:true); if (reg<0) return;
unsigned long funcmask = (1UL<<functionNumber);
speedTable[reg].functions ^= funcmask;
if (functionNumber <= 28) {
updateGroupflags(speedTable[reg].groupFlags, functionNumber);
}
CommandDistributor::broadcastLoco(reg);
} }
// Report function state (used from withrottle protocol) // Report function state (used from withrottle protocol)

View File

@ -3,8 +3,7 @@
#include "StringFormatter.h" #include "StringFormatter.h"
#define VERSION "5.4.3" #define VERSION "5.4.2"
// 5.4.3 - bugfix changeFn for functions 29..31
// 5.4.2 - Reversed turnout bugfix // 5.4.2 - Reversed turnout bugfix
// 5.4.1 - ESP32 bugfix packet buffer race // 5.4.1 - ESP32 bugfix packet buffer race
// 5.4.0 - New version on master // 5.4.0 - New version on master