mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 21:01:25 +01:00
Allow left/right turnout labels WiThrottle
TPL assist
This commit is contained in:
parent
9b58eb29a2
commit
6fadd18827
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user