Skip to content

Commit 06bdb99

Browse files
authored
Display release number (#1217)
1 parent 4104cdb commit 06bdb99

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

core/MySensorsCore.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,8 @@ void _begin(void)
110110
displaySplashScreen();
111111
#endif
112112

113-
CORE_DEBUG(PSTR("MCO:BGN:INIT " MY_NODE_TYPE ",CP=" MY_CAPABILITIES ",VER="
114-
MYSENSORS_LIBRARY_VERSION "\n"));
115-
113+
CORE_DEBUG(PSTR("MCO:BGN:INIT " MY_NODE_TYPE ",CP=" MY_CAPABILITIES ",REL=%" PRIu8 ",VER="
114+
MYSENSORS_LIBRARY_VERSION "\n"), MYSENSORS_LIBRARY_VERSION_PRERELEASE_NUMBER);
116115
if (!hwInitResult) {
117116
CORE_DEBUG(PSTR("!MCO:BGN:HW ERR\n"));
118117
setIndication(INDICATION_ERR_HW_INIT);
@@ -438,6 +437,11 @@ bool _processInternalCoreMessage(void)
438437
presentNode();
439438
} else if (type == I_HEARTBEAT_REQUEST) {
440439
(void)sendHeartbeat();
440+
} else if (_msg.type == I_VERSION) {
441+
#if !defined(MY_GATEWAY_FEATURE)
442+
(void)_sendRoute(build(_msgTmp, GATEWAY_ADDRESS, NODE_SENSOR_ID, C_INTERNAL,
443+
I_VERSION).set(MYSENSORS_LIBRARY_VERSION_INT));
444+
#endif
441445
} else if (type == I_TIME) {
442446
// Deliver time to callback
443447
if (receiveTime) {

core/MySensorsCore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* |E| SYS | SUB | Message | Comment
4141
* |-|-----|-----|---------------------------------------------|--------------------------------------------------------------------------------------------------
4242
* |!| MCO | BGN | HW ERR | Error HW initialization (e.g. ext. EEPROM)
43-
* | | MCO | BGN | INIT %%s,CP=%%s,VER=%%s | Core initialization, capabilities (CP), library version (VER)
43+
* | | MCO | BGN | INIT %%s,CP=%%s,REL=%%d,VER=%%s (%%d) | Core initialization, capabilities (CP), release number (REL), library version (VER)
4444
* | | MCO | BGN | BFR | Callback before()
4545
* | | MCO | BGN | STP | Callback setup()
4646
* | | MCO | BGN | INIT OK,TSP=%%d | Core initialised, transport status (TSP): 0=not initialised, 1=initialised, NA=not available

0 commit comments

Comments
 (0)