1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-26 17:46:14 +01:00

Implement WiThrottle "force function" subcommand "f"

This commit is contained in:
Harald Barth 2024-09-12 14:20:24 +02:00
parent 4ab77c21ed
commit 2606d73d93

View File

@ -322,6 +322,15 @@ void WiThrottle::locoAction(RingStream * stream, byte* aval, char throttleChar,
} }
break; 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': case 'q':
if (aval[1]=='V' || aval[1]=='R' ) { //qV or qR if (aval[1]=='V' || aval[1]=='R' ) { //qV or qR
// just flag the loco for broadcast and it will happen. // just flag the loco for broadcast and it will happen.