Hi, I was reading this example Wake publish sleep example
I wonder if it could be improved and add the option to send all the cloud messages before going to sleep WAIT_CLOUD:
So instead of the example doing this:
It could do this?
FYI @Colleen @rickkas7
Love this idea.
Also for publishing using publishQueuePOSIX, there is a function called getCanSleep() but I have never been able to make it work correctly.
hum, I was just wondering how the WAIT_CLOUD would work with the PublishQueuePosixRK and PublishQueueAsyncRK libraries.
Maybe @rickkas7 can shed some light here?
It’s generally better to use the graceful disconnect global setting Particle.setDisconnectOptions instead.
WAIT_CLOUD just temporarily sets the
graceful option to true, but it’s better to set the global option so you can also set how long you want to wait. And setting the global option makes it work for all sleep calls, as well as system reset.