diff --git a/DCC.cpp b/DCC.cpp index ca563ac..972dfa3 100644 --- a/DCC.cpp +++ b/DCC.cpp @@ -155,6 +155,15 @@ int DCC::changeFn( int cab, byte functionNumber, bool pressed) { return funcstate; } +int DCC::getFn( int cab, byte functionNumber) { + if (cab<=0 || functionNumber>28) return -1; // unknown + int reg = lookupSpeedTable(cab); + if (reg<0) return -1; + + unsigned long funcmask = (1UL<