mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
Broadcast if group changed
This commit is contained in:
parent
985f0e777c
commit
96933ed516
4
DCC.cpp
4
DCC.cpp
|
@ -179,15 +179,17 @@ void DCC::setFn( int cab, int16_t functionNumber, bool on) {
|
|||
|
||||
// Take care of functions:
|
||||
// Set state of function
|
||||
unsigned long previous=speedTable[reg].functions;
|
||||
unsigned long funcmask = (1UL<<functionNumber);
|
||||
if (on) {
|
||||
speedTable[reg].functions |= funcmask;
|
||||
} else {
|
||||
speedTable[reg].functions &= ~funcmask;
|
||||
}
|
||||
if (speedTable[reg].functions != previous) {
|
||||
updateGroupflags(speedTable[reg].groupFlags, functionNumber);
|
||||
CommandDistributor::broadcastLoco(reg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Change function according to how button was pressed,
|
||||
|
|
Loading…
Reference in New Issue
Block a user