1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-28 09:53:45 +02:00

Withrottle broadcast functions and speeds

This commit is contained in:
Asbelos
2021-12-15 19:51:01 +00:00
parent 96933ed516
commit b0c9806f3b
6 changed files with 70 additions and 18 deletions

View File

@@ -247,6 +247,12 @@ void DCC::updateGroupflags(byte & flags, int16_t functionNumber) {
flags |= groupMask;
}
uint16_t DCC::getFunctionMap(int cab) {
if (cab<=0) return 0; // unknown pretend all functions off
int reg = lookupSpeedTable(cab);
return (reg<0)?0:speedTable[reg].functions;
}
void DCC::setAccessory(int address, byte number, bool activate) {
#ifdef DIAG_IO
DIAG(F("DCC::setAccessory(%d,%d,%d)"), address, number, activate);