mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-25 05:31:24 +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))
|
if (myLocos[loco].throttle==THROTTLECHAR && (CAB<0 || myLocos[loco].cab==CAB))
|
||||||
|
|
||||||
WiThrottle * WiThrottle::firstThrottle=NULL;
|
WiThrottle * WiThrottle::firstThrottle=NULL;
|
||||||
|
bool WiThrottle::annotateLeftRight=false;
|
||||||
|
|
||||||
WiThrottle* WiThrottle::getThrottle( int wifiClient) {
|
WiThrottle* WiThrottle::getThrottle( int wifiClient) {
|
||||||
for (WiThrottle* wt=firstThrottle; wt!=NULL ; wt=wt->nextThrottle)
|
for (WiThrottle* wt=firstThrottle; wt!=NULL ; wt=wt->nextThrottle)
|
||||||
@ -99,7 +100,10 @@ void WiThrottle::parse(Print & stream, byte * cmdx) {
|
|||||||
switch (callState) {
|
switch (callState) {
|
||||||
case 0: // first call in
|
case 0: // first call in
|
||||||
callState++;
|
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);
|
DCCWaveform::mainTrack.getPowerMode()==POWERMODE::ON);
|
||||||
break;
|
break;
|
||||||
case 1: // second call... send the turnout table if we have one
|
case 1: // second call... send the turnout table if we have one
|
||||||
|
@ -30,7 +30,7 @@ class WiThrottle {
|
|||||||
static void loop();
|
static void loop();
|
||||||
void parse(Print & stream, byte * cmd);
|
void parse(Print & stream, byte * cmd);
|
||||||
static WiThrottle* getThrottle( int wifiClient);
|
static WiThrottle* getThrottle( int wifiClient);
|
||||||
|
static bool annotateLeftRight;
|
||||||
private:
|
private:
|
||||||
WiThrottle( int wifiClientId);
|
WiThrottle( int wifiClientId);
|
||||||
~WiThrottle();
|
~WiThrottle();
|
||||||
|
Loading…
Reference in New Issue
Block a user