Hi, I have the following code. From what I can tell, it works fine; devices download updates pretty consistently. One quirk I noticed however is that there’s usually a 20-30s delay between “spark/status” - auto-update, and “spark/status” - started (i.e. breathing cyan to blinking magenta). I don’t really understand where this delay comes from - is it normal for it to happen?
SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(MANUAL);
void setup(){
System.disableUpdates();
System.on(firmware_update_pending, otaHandler);
}
void loop() {
}
void otaHandler () {
System.enableUpdates();
for (uint32_t ms = millis(); millis() - ms < 120000; Particle.process());
}