mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-21 19:51:50 +00:00
Start pull at 5 seconds uptime
This commit is contained in:
1 parent
028014ab58
commit
27d8435c9b
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -10061,7 +10061,7 @@ void mg_ota_url_check(struct mg_mgr *mgr, const char *my_version,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mg_ota_poll(struct mg_mgr *mgr) {
|
void mg_ota_poll(struct mg_mgr *mgr) {
|
||||||
static uint64_t t = 1;
|
static uint64_t t = 5000; // Fire first time 5 sec after boot
|
||||||
if (MG_OTA_URL != NULL &&
|
if (MG_OTA_URL != NULL &&
|
||||||
mg_timer_expired(&t, MG_OTA_PULL_INTERVAL_SECONDS * 1000, mg_millis())) {
|
mg_timer_expired(&t, MG_OTA_PULL_INTERVAL_SECONDS * 1000, mg_millis())) {
|
||||||
mg_ota_url_check(mgr, MG_OTA_FIRMWARE_VERSION, MG_OTA_URL,
|
mg_ota_url_check(mgr, MG_OTA_FIRMWARE_VERSION, MG_OTA_URL,
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ void mg_ota_url_check(struct mg_mgr *mgr, const char *my_version,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mg_ota_poll(struct mg_mgr *mgr) {
|
void mg_ota_poll(struct mg_mgr *mgr) {
|
||||||
static uint64_t t = 1;
|
static uint64_t t = 5000; // Fire first time 5 sec after boot
|
||||||
if (MG_OTA_URL != NULL &&
|
if (MG_OTA_URL != NULL &&
|
||||||
mg_timer_expired(&t, MG_OTA_PULL_INTERVAL_SECONDS * 1000, mg_millis())) {
|
mg_timer_expired(&t, MG_OTA_PULL_INTERVAL_SECONDS * 1000, mg_millis())) {
|
||||||
mg_ota_url_check(mgr, MG_OTA_FIRMWARE_VERSION, MG_OTA_URL,
|
mg_ota_url_check(mgr, MG_OTA_FIRMWARE_VERSION, MG_OTA_URL,
|
||||||
|
|||||||
Reference in new issue
Block a user