fix(firmware): add HTTP timeouts + 3-try retry, report heartbeat status
Unbounded TLS/HTTP POSTs were blocking the reporter task indefinitely on weak WiFi. Now: 5s connect timeout, 10s response timeout, 3 attempts with 0/2s/5s backoff. Every attempt logs HTTP_OK or HTTP_FAIL to the event log. reporter_heartbeat now returns bool so the caller can count consecutive misses.
This commit is contained in:
@@ -17,5 +17,5 @@ static const char* REPORTER_API_HOST = "http://logs.research.bike";
|
||||
void reporter_init();
|
||||
void reporter_submit_camera(const DeviceConfig& cfg, const CameraHourlyRecord& rec);
|
||||
void reporter_submit_ble(const DeviceConfig& cfg, const BLEHourlyRecord& rec);
|
||||
void reporter_heartbeat(const DeviceConfig& cfg, uint32_t uptime_s, int wifi_rssi);
|
||||
bool reporter_heartbeat(const DeviceConfig& cfg, uint32_t uptime_s, int wifi_rssi);
|
||||
void reporter_flush(const DeviceConfig& cfg);
|
||||
|
||||
Reference in New Issue
Block a user