diff --git a/core/MySensorsCore.cpp b/core/MySensorsCore.cpp index 9afd2d5..8e5a5fa 100644 --- a/core/MySensorsCore.cpp +++ b/core/MySensorsCore.cpp @@ -76,8 +76,10 @@ void _begin() { debug(PSTR("MCO:BGN:INIT " MY_NODE_TYPE ",CP=" MY_CAPABILITIES ",VER=" MYSENSORS_LIBRARY_VERSION "\n")); // Call before() in sketch (if it exists) - if (before) + if (before) { + debug(PSTR("MCO:BGN:BFR\n")); // before callback before(); + } #if defined(MY_LEDS_BLINKING_FEATURE) ledsInit(); @@ -158,6 +160,7 @@ void _begin() { // Call sketch setup if (setup) { + debug(PSTR("MCO:BGN:STP\n")); // setup callback setup(); } diff --git a/core/MySensorsCore.h b/core/MySensorsCore.h index e306477..5676840 100644 --- a/core/MySensorsCore.h +++ b/core/MySensorsCore.h @@ -40,6 +40,8 @@ * |E| SYS | SUB | Message | Comment * |-|------|-------|-------------------------------------------|---------------------------------------------------------------------------- * | | MCO | BGN | INIT %%s,CP=%%s,LIB=%%s | Core initialization, capabilities (CP), library version (VER) + * | | MCO | BGN | BFR | Callback before() + * | | MCO | BGN | STP | Callback setup() * | | MCO | BGN | INIT OK,ID=%%d,PAR=%%d,DIS=%%d,REG=%%d | Core initialized, parent ID (PAR), distance to GW (DIS), registration (REG) * | | MCO | BGN | NODE UNLOCKED | Node successfully unlocked (see signing chapter) * |!| MCO | BGN | TSP FAIL | Transport initialization failed