mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-27 01:56:14 +01:00
Start on position description
This commit is contained in:
parent
6adff43f4b
commit
1f5f7754c1
|
@ -712,10 +712,11 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
|
||||||
uint8_t posCount = tto->getPositionCount();
|
uint8_t posCount = tto->getPositionCount();
|
||||||
const FSH *todesc = NULL;
|
const FSH *todesc = NULL;
|
||||||
#ifdef EXRAIL_ACTIVE
|
#ifdef EXRAIL_ACTIVE
|
||||||
// todesc = RMFT2::getTurntableDescription(id);
|
todesc = RMFT2::getTurntableDescription(id);
|
||||||
#endif
|
#endif
|
||||||
if (todesc == NULL) todesc = F("");
|
if (todesc == NULL) todesc = F("");
|
||||||
StringFormatter::send(stream, F(" %d %d %d"), id, type, pos);
|
StringFormatter::send(stream, F(" %d %d %d"), id, type, pos, todesc);
|
||||||
|
|
||||||
for (uint8_t p = 0; p < posCount; p++) {
|
for (uint8_t p = 0; p < posCount; p++) {
|
||||||
int16_t value = tto->getPositionValue(p);
|
int16_t value = tto->getPositionValue(p);
|
||||||
StringFormatter::send(stream, F(" %d"), value);
|
StringFormatter::send(stream, F(" %d"), value);
|
||||||
|
|
|
@ -149,7 +149,7 @@ class LookList {
|
||||||
static const FSH * getRosterName(int16_t id);
|
static const FSH * getRosterName(int16_t id);
|
||||||
static const FSH * getRosterFunctions(int16_t id);
|
static const FSH * getRosterFunctions(int16_t id);
|
||||||
static const FSH * getTurntableDescription(int16_t id);
|
static const FSH * getTurntableDescription(int16_t id);
|
||||||
// static const FSH * getTurntablePositionDescription(int16_t id, uint8_t position);
|
static const FSH * getTurntablePositionDescription(int16_t turntableId, uint8_t positionId);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16_t p[]);
|
static void ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16_t p[]);
|
||||||
|
|
|
@ -205,10 +205,14 @@ const FSH * RMFT2::getTurntableDescription(int16_t turntableId) {
|
||||||
// Pass to get turntable position descriptions (optional)
|
// Pass to get turntable position descriptions (optional)
|
||||||
// #include "EXRAIL2MacroReset.h"
|
// #include "EXRAIL2MacroReset.h"
|
||||||
// #undef TT_ADDPOSITION
|
// #undef TT_ADDPOSITION
|
||||||
// #define TT_ADDPOSITION(turntable_id,value,description...) 0_DESC(id,description)
|
// #define TT_ADDPOSITION(turntable_id,value,description...) O_DESC(turntable_id,description)
|
||||||
|
|
||||||
// const FSH * RMFT2::getTurntablePositionDescription(int16_t turntableId, uint8_t positionId) {
|
// const FSH * RMFT2::getTurntablePositionDescription(int16_t turntableId, uint8_t positionId) {
|
||||||
|
// switch (turntableId) {
|
||||||
|
// #include "myAutomation.h"
|
||||||
|
// default:break;
|
||||||
|
// }
|
||||||
|
// return NULL;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Pass 6: Roster IDs (count)
|
// Pass 6: Roster IDs (count)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user