Add support for signals
This commit is contained in:
parent
872488d174
commit
039c093b15
13 changed files with 565 additions and 237 deletions
|
|
@ -32,6 +32,7 @@ private:
|
|||
|
||||
static constexpr int TRAIN_LIST = 1;
|
||||
static constexpr int TURNOUT_LIST = 2;
|
||||
static constexpr int SIGNAL_LIST = 3;
|
||||
|
||||
int listMode = 0;
|
||||
|
||||
|
|
@ -49,6 +50,7 @@ private:
|
|||
void processItemState(const QString& buffer);
|
||||
std::shared_ptr<Item> processTrainLine(const QString& buffer);
|
||||
std::shared_ptr<Item> processTurnoutLine(const QString& buffer);
|
||||
std::shared_ptr<Item> processSignalLine(const QString& buffer);
|
||||
|
||||
void write(char *buffer, const size_t length);
|
||||
void write(const QByteArray& buffer);
|
||||
|
|
@ -67,6 +69,7 @@ public slots:
|
|||
void trainReverse(uint8_t id);
|
||||
void trainSetFunction(uint8_t id, uint8_t function, bool on);
|
||||
void tunoutSetDirection(uint8_t id, bool direction);
|
||||
void signalSetValue(uint8_t id, uint8_t state);
|
||||
void estop();
|
||||
void setPower(bool on);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue