1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

Move Turnout code from .h to .cpp.

Move implementation of Turnout::printState from Turnouts.h to Turnouts.cpp.  No functional changes.
This commit is contained in:
Neil McKechnie 2021-08-22 22:30:09 +01:00
parent 7b47b86143
commit fdaa7b51b9
2 changed files with 6 additions and 4 deletions

View File

@ -74,6 +74,11 @@
turnoutlistHash++;
}
void Turnout::printState(Print *stream) {
StringFormatter::send(stream, F("<H %d %d>\n"),
_turnoutData.id, _turnoutData.closed ^ useLegacyTurnoutBehaviour);
}
// Remove nominated turnout from turnout linked list and delete the object.
bool Turnout::remove(uint16_t id) {
Turnout *tt,*pp=NULL;

View File

@ -114,10 +114,7 @@ public:
inline bool isType(uint8_t type) { return _turnoutData.turnoutType == type; }
inline uint16_t getId() { return _turnoutData.id; }
inline Turnout *next() { return _nextTurnout; }
inline void printState(Print *stream) {
StringFormatter::send(stream, F("<H %d %d>\n"),
_turnoutData.id, _turnoutData.closed ^ useLegacyTurnoutBehaviour);
}
void printState(Print *stream);
/*
* Virtual functions
*/