mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 13:21:23 +01:00
WiThrottle sendIntro after initial N message as well
This commit is contained in:
parent
63702ae64e
commit
e7f82bdf92
@ -187,6 +187,7 @@ void WiThrottle::parse(RingStream * stream, byte * cmdx) {
|
||||
}
|
||||
break;
|
||||
case 'N': // Heartbeat (2), only send if connection completed by 'HU' message
|
||||
sendIntro(stream);
|
||||
StringFormatter::send(stream, F("*%d\n"), heartrateSent ? HEARTBEAT_SECONDS : HEARTBEAT_PRELOAD); // return timeout value
|
||||
break;
|
||||
case 'M': // multithrottle
|
||||
@ -498,6 +499,8 @@ void WiThrottle::getLocoCallback(int16_t locoid) {
|
||||
}
|
||||
|
||||
void WiThrottle::sendIntro(Print* stream) {
|
||||
if (introSent) // sendIntro only once
|
||||
return;
|
||||
introSent=true;
|
||||
StringFormatter::send(stream,F("VN2.0\nHTDCC-EX\nRL0\n"));
|
||||
StringFormatter::send(stream,F("HtDCC-EX v%S, %S, %S, %S\n"), F(VERSION), F(ARDUINO_TYPE), DCC::getMotorShieldName(), F(GITHUB_SHA));
|
||||
|
Loading…
Reference in New Issue
Block a user