diff --git a/WiThrottle.cpp b/WiThrottle.cpp index b65d890..6c39e54 100644 --- a/WiThrottle.cpp +++ b/WiThrottle.cpp @@ -50,6 +50,7 @@ if (myLocos[loco].throttle==THROTTLECHAR && (CAB<0 || myLocos[loco].cab==CAB)) WiThrottle * WiThrottle::firstThrottle=NULL; +bool WiThrottle::annotateLeftRight=false; WiThrottle* WiThrottle::getThrottle( int wifiClient) { for (WiThrottle* wt=firstThrottle; wt!=NULL ; wt=wt->nextThrottle) @@ -99,7 +100,10 @@ void WiThrottle::parse(Print & stream, byte * cmdx) { switch (callState) { case 0: // first call in callState++; - StringFormatter::send(stream,F("VN2.0\nHTDCC++EX\nRL0\nPPA%x\nPTT]\\[Turnouts}|{Turnout]\\[Closed}|{2]\\[Thrown}|{4\n*10\n"), + StringFormatter::send(stream,F("VN2.0\nHTDCC++EX\nRL0\nPPA%x\n")); + if (annotateLeftRight) StringFormatter::send(stream,F("PTT]\\[Turnouts}|{Turnout]\\[Left}|{2]\\[Right}|{4\n")); + else StringFormatter::send(stream,F("PTT]\\[Turnouts}|{Turnout]\\[Closed}|{2]\\[Thrown}|{4\n")); + StringFormatter::send(stream,F("*10\n"), DCCWaveform::mainTrack.getPowerMode()==POWERMODE::ON); break; case 1: // second call... send the turnout table if we have one diff --git a/WiThrottle.h b/WiThrottle.h index d039c8d..b0f29f9 100644 --- a/WiThrottle.h +++ b/WiThrottle.h @@ -30,7 +30,7 @@ class WiThrottle { static void loop(); void parse(Print & stream, byte * cmd); static WiThrottle* getThrottle( int wifiClient); - + static bool annotateLeftRight; private: WiThrottle( int wifiClientId); ~WiThrottle();