1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-28 09:53:45 +02:00

Trackmanager rework for simpler structure

This commit is contained in:
Harald Barth
2023-11-14 00:05:18 +01:00
parent 86ed8ff8a6
commit 582ff890f4
6 changed files with 126 additions and 163 deletions

View File

@@ -248,6 +248,11 @@ void CommandDistributor::broadcastLoco(byte slot) {
}
void CommandDistributor::broadcastPower() {
char pstr[] = "? x";
for(byte t=0; t<8; t++)
if (TrackManager::getPower(t, pstr))
broadcastReply(COMMAND_TYPE, F("<p%s>\n"),pstr);
bool main=TrackManager::getMainPower()==POWERMODE::ON;
bool prog=TrackManager::getProgPower()==POWERMODE::ON;
bool join=TrackManager::isJoined();