!MCO:PRO:RC=1 in debug logs
-
When enabling MyDebug on a node I'm working on, I sometimes see bursts of this:
100776 !MCO:WAI:RC=1 100780 !MCO:PRO:RC=1 100782 !MCO:PRO:RC=1 100784 !MCO:PRO:RC=1 100786 !MCO:PRO:RC=1 100788 !MCO:PRO:RC=1 100790 !MCO:PRO:RC=1 100792 !MCO:PRO:RC=1 100794 !MCO:PRO:RC=1 100796 !MCO:PRO:RC=1 100798 !MCO:PRO:RC=1 100800 !MCO:PRO:RC=1 100802 !MCO:PRO:RC=1 100804 !MCO:PRO:RC=1 100806 !MCO:PRO:RC=1 100808 !MCO:PRO:RC=1 100810 !MCO:PRO:RC=1 100812 !MCO:PRO:RC=1 100814 !MCO:PRO:RC=1 100816 !MCO:PRO:RC=1 100818 !MCO:PRO:RC=1 100820 !MCO:PRO:RC=1 100823 !MCO:PRO:RC=1 100825 !MCO:PRO:RC=1 100827 !MCO:PRO:RC=1 100829 !MCO:PRO:RC=1 100831 !MCO:PRO:RC=1 100833 !MCO:PRO:RC=1 100835 !MCO:PRO:RC=1 100837 !MCO:PRO:RC=1 100840 !MCO:PRO:RC=1 ...etc... 102779 !MCO:PRO:RC=1
I don't see anything about this on the forum. I did find that MCO means "MySensors core".
It seems to happen during the
wait
part of the code below, which is in the receive function:// Change relay state desiredState = message.getBool()?RELAY_ON:RELAY_OFF; if(desiredState == RELAY_ON){ send(relay_message.setSensor(message.sensor).set(RELAY_ON)); // Send on state digitalWrite(RELAY_1, RELAY_ON); Serial.println(F("Turning on")); wait(PULSELENGTH); digitalWrite(RELAY_1, RELAY_OFF); Serial.println(F("Turned off")); //send(relay_message.setSensor(message.sensor).set(RELAY_OFF)); // Send off state } send(relay_message.setSensor(message.sensor).set(RELAY_OFF)); // Send off state }
Perhaps I should keep the receive function as brief as possible?
-
Yes, that was it. I love it when I answer my own questions
-
@alowhum the warning is emitted at https://github.com/mysensors/MySensors/blob/dd91aeb9c30dbd658bd02c34445669a7cd996c0f/core/MySensorsCore.cpp#L60
Calling wait and send from within receive can cause recursive loops, which is why the log message is shown.
-
Ah, interesting, thanks for the explanation.
-
Updated log parser to include RC debug messages: https://github.com/mysensors/MySensors/pull/1396