From 2606d73d931252cdae2df2dadecfe2aac80254d6 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Thu, 12 Sep 2024 14:20:24 +0200 Subject: [PATCH] Implement WiThrottle "force function" subcommand "f" --- WiThrottle.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/WiThrottle.cpp b/WiThrottle.cpp index f3d9253..11050b9 100644 --- a/WiThrottle.cpp +++ b/WiThrottle.cpp @@ -322,6 +322,15 @@ void WiThrottle::locoAction(RingStream * stream, byte* aval, char throttleChar, } break; } + case 'f': // Function key set, force function variant + { + bool pressed=aval[1]=='1'; + int fKey = getInt(aval+2); + LOOPLOCOS(throttleChar, cab) { + DCC::setFn(myLocos[loco].cab,fKey, pressed); + } + break; + } case 'q': if (aval[1]=='V' || aval[1]=='R' ) { //qV or qR // just flag the loco for broadcast and it will happen.