mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 12:51:24 +01:00
Turn out changes for WiThrottle
This commit is contained in:
parent
55d175adb0
commit
f7557f1436
@ -29,6 +29,7 @@
|
||||
if (tt==NULL) return false;
|
||||
tt->activate(state);
|
||||
if(n>0) EEPROM.put(n,tt->data.tStatus);
|
||||
turnoutlistHash++;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -68,6 +69,7 @@ bool Turnout::remove(int n){
|
||||
pp->nextTurnout=tt->nextTurnout;
|
||||
|
||||
free(tt);
|
||||
turnoutlistHash++;
|
||||
return true;
|
||||
|
||||
}
|
||||
@ -150,8 +152,11 @@ Turnout *Turnout::create(int id){
|
||||
firstTurnout=tt;
|
||||
tt->data.id=id;
|
||||
}
|
||||
turnoutlistHash++;
|
||||
return tt;
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Turnout *Turnout::firstTurnout=NULL;
|
||||
int Turnout::turnoutlistHash=0; //bump on every change so clients know when to refresh their lists
|
||||
|
||||
|
@ -36,6 +36,7 @@ struct TurnoutData {
|
||||
class Turnout {
|
||||
public:
|
||||
static Turnout *firstTurnout;
|
||||
static int turnoutlistHash;
|
||||
TurnoutData data;
|
||||
Turnout *nextTurnout;
|
||||
static bool activate(int n, bool state);
|
||||
|
Loading…
Reference in New Issue
Block a user