mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-07-28 18:03:45 +02:00
<T> should send turnout definitions, not just states (#110)
* use int, not byte for witSpeed * add turnout, sensor and output states to 's'tatus message * <T> should send turnout definitions, not just states
This commit is contained in:
@@ -21,10 +21,17 @@
|
||||
#include "Turnouts.h"
|
||||
#include "EEStore.h"
|
||||
#include "PWMServoDriver.h"
|
||||
#include "StringFormatter.h"
|
||||
#ifdef EESTOREDEBUG
|
||||
#include "DIAG.h"
|
||||
#endif
|
||||
|
||||
// print all turnout states to stream
|
||||
void Turnout::printAll(Print *stream){
|
||||
for (Turnout *tt = Turnout::firstTurnout; tt != NULL; tt = tt->nextTurnout)
|
||||
StringFormatter::send(stream, F("<H %d %d>"), tt->data.id, (tt->data.tStatus & STATUS_ACTIVE)!=0);
|
||||
} // Turnout::printAll
|
||||
|
||||
bool Turnout::activate(int n,bool state){
|
||||
#ifdef EESTOREDEBUG
|
||||
DIAG(F("\nTurnout::activate(%d,%d)\n"),n,state);
|
||||
|
Reference in New Issue
Block a user