Hi
I am trying to make this example to work: https://mongoose-os.com/docs/mongoose-os/howtos/trix.md
It was suspicious to me that logs doesn’t come at specified intervals, so I modified example to log simple counter:
#include "mgos.h"
const char *s_url = "https://script.google.com/macros/s/AKfycbw4aaRW5x-oHimo-kOw29SDOHa
qhFUEgb1zT_wHtq3jcyAXa/exec";
static int counter1 = 0;
static void timer_cb(void *arg) {
char buf[100];
struct json_out out = JSON_OUT_BUF(buf, sizeof(buf));
json_printf(&out, "[%d]", counter1);
LOG(LL_INFO, ("counter1: %d", counter1)); // log to console to compare with what logged to Google Spreadsheep
mg_connect_http(mgos_get_mgr(), NULL, NULL, s_url, NULL, buf);
counter1++ ;
(void) arg;
}
enum mgos_app_init_result mgos_app_init(void) {
mgos_set_timer(10000, MGOS_TIMER_REPEAT, timer_cb, NULL);
return MGOS_APP_INIT_SUCCESS;
}
And indeed there some records missed in Google Spreadsheet:
Here is what I get in Spreadsheet:
|19/09/2019 23:20:50|0|
|19/09/2019 23:21:11|2|
|19/09/2019 23:21:22|3|
|19/09/2019 23:21:31|4|
|19/09/2019 23:21:42|5|
|19/09/2019 23:21:53|6|
|19/09/2019 23:22:10|7|
|19/09/2019 23:25:32|28|
|19/09/2019 23:25:42|29|
|19/09/2019 23:25:52|30|
|19/09/2019 23:26:03|31|
|19/09/2019 23:26:23|33|
|19/09/2019 23:26:49|35|
|19/09/2019 23:27:30|39|
My connection is rock solid, this can’t be an issue.
Any thoughts?