How avoid endless loop when radio init fails?
I would like to build a actuator/sensor node with mySensors 2.0 which have an autonoumous feature. This means when the connection to the gateway fails during operation as well as on booting the node should go on working in a stand-alone mode until connection comes back. Currently I am trying to achive that the node boots without radio connection but it hangs somewehre in an endless loop trying to connect. What I would like to have is a quick connection trial at boot time and if this fails going quickly to he loop() function.
It seems to me that this function is only in the developed branch with the parameter
@tonnerre33 @Heizelmann This is a fairly new feature in the development branch (upcoming 2.1.0 release). Essentially, you can set a timeout (in MS) after which the node will enter the main loop in case of unsuccessful transport initialisation. Set to 0 if the node should establish the GW uplink before entering loop().
For example, set
#define MY_TRANSPORT_WAIT_READY_MS 15000
for a 15s timeout.
@tekka Thank you for this outlook.
For me this feature is essential and I am wondering if it is not implemented from the beginning. So I hope that it will be published soon.
Anyway I like MySensors and the great developer community. Many thanks to all.