1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-26 17:46:14 +01:00

Added returnDCAddr

Added function to return DC address
This commit is contained in:
Colin Murdoch 2023-10-10 11:52:46 +01:00
parent fe618d0b85
commit 68fd56e7fc
2 changed files with 7 additions and 1 deletions

View File

@ -356,6 +356,7 @@ void TrackManager::streamTrackState(Print* stream, byte t) {
if (track[t]==NULL) return;
auto format=F("");
bool pstate = TrackManager::isPowerOn(t);
switch(track[t]->getMode()) {
case TRACK_MODE_MAIN:
if (pstate) {format=F("<= %c MAIN ON>\n");} else {format = F("<= %c MAIN OFF>\n");}
@ -562,7 +563,11 @@ byte TrackManager::returnMode(byte t) {
return (track[t]->getMode());
}
static const char* TrackManager::getModeName(byte Mode) {
int16_t TrackManager::returnDCAddr(byte t) {
return (trackDCAddr[t]);
}
const char* TrackManager::getModeName(byte Mode) {
//DIAG(F("PowerMode %d"), Mode);

View File

@ -91,6 +91,7 @@ class TrackManager {
static bool isPowerOn(byte t);
static bool isProg(byte t);
static byte returnMode(byte t);
static int16_t returnDCAddr(byte t);
static const char* getModeName(byte Mode);
static int16_t joinRelay;