mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 16:16:13 +01:00
27 lines
575 B
C++
27 lines
575 B
C++
#include <Arduino.h>
|
|
|
|
class JMRITurnout {
|
|
|
|
public:
|
|
static void parse(Stream & stream, int params, int p[]);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static void showAll(Stream & stream);
|
|
static bool show(Stream & stream ,int id, bool all);
|
|
static bool create(int id, int address, byte subAddress);
|
|
static bool remove(int id);
|
|
static bool activate(int id, bool thrown);
|
|
static bool invalid(int id);
|
|
|
|
struct TurnoutEntry {
|
|
int address;
|
|
byte subAddress;
|
|
bool thrown;
|
|
};
|
|
static const int MAX_TURNOUTS=50;
|
|
static TurnoutEntry table[MAX_TURNOUTS];
|
|
};
|