mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-01-22 10:38:52 +01:00
Merge branch 'master-fn31'
This commit is contained in:
commit
9054d8d9f5
12
DCC.cpp
12
DCC.cpp
@ -229,15 +229,9 @@ 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) {
|
||||||
if (cab<=0 || functionNumber>31) return;
|
auto currentValue=getFn(cab,functionNumber);
|
||||||
int reg = lookupSpeedTable(cab);
|
if (currentValue<0) return; // function not valid for change
|
||||||
if (reg<0) return;
|
setFn(cab,functionNumber, currentValue?false:true);
|
||||||
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)
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
#include "StringFormatter.h"
|
#include "StringFormatter.h"
|
||||||
|
|
||||||
#define VERSION "5.4.2"
|
#define VERSION "5.4.3"
|
||||||
|
// 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
|
||||||
|
Loading…
Reference in New Issue
Block a user