chore(firmware): mark TODOs for the dev-only 60s polling cap
Three cross-referenced markers — config.h, operation.h, and FW-10 in the test file — calling out that the FETCH_INTERVAL_MS cap is intentionally holding the polling rate at 1 minute for dev iteration. Once the firmware is stable and we want the device to honor the app's per-frame rotationIntervalMinutes / wakeHour settings, the cap in operation.h becomes a sanity-clamp (e.g., 30 s ≤ sleep ≤ 25 h) and the no-header fallback splits into its own constant. Behavior unchanged — comments only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -131,6 +131,15 @@ void normal_operation_impl(const String& mac, HTTP& http, const String& url, Pre
|
||||
http.collectHeaders(collectHeaders, 3);
|
||||
int code = http.GET();
|
||||
|
||||
// TODO(post-dev): trust the server's X-Interval-Ms instead of capping
|
||||
// it at FETCH_INTERVAL_MS. The cap is here so the dev unit polls
|
||||
// every minute regardless of what the app's rotationIntervalMinutes /
|
||||
// wakeHour settings say — fast iteration. Once the firmware is stable
|
||||
// and we want real battery life on V2, the line below should become
|
||||
// simply `sleepMs = v;` plus a sanity clamp (e.g. min 30 s, max 25 h).
|
||||
// Tests FW-09 and FW-10 in test_normal_operation/test_main.cpp lock
|
||||
// the current behavior — update them when removing the cap. See the
|
||||
// matching note in config.h on FETCH_INTERVAL_MS.
|
||||
uint64_t sleepMs = FETCH_INTERVAL_MS;
|
||||
String intervalHdr = http.header("X-Interval-Ms");
|
||||
if (intervalHdr.length() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user