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

Turnout notification handling enhanced.

Ensure that the <H> message is sent on the serial USB (to JMRI) whenever the turnout is closed or thrown, even if the request didn't originate on the serial USB.
This commit is contained in:
Neil McKechnie
2021-08-20 00:07:50 +01:00
parent 7f6173825f
commit b4a3b503bc
3 changed files with 15 additions and 5 deletions

View File

@@ -125,7 +125,12 @@ const int16_t HASH_KEYWORD_VPIN=-415;
#if defined(RMFT_ACTIVE)
RMFT2::turnoutEvent(id, closeFlag);
#endif
#endif
// Send message to JMRI etc. over Serial USB. This is done here
// to ensure that the message is sent when the turnout operation
// is not initiated by a Serial command.
StringFormatter::send(Serial, F("<H %d %d>\n"), id, closeFlag);
return ok;
}