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:
+13
-1
@@ -123,6 +123,18 @@
|
||||
#define AP_IP "192.168.4.1"
|
||||
#define WIFI_TIMEOUT_MS 30000
|
||||
#ifndef FETCH_INTERVAL_MS
|
||||
#define FETCH_INTERVAL_MS 60000 // 1 min deep sleep between polls
|
||||
// TODO(post-dev): drop the 60s cap. Today this value is used in
|
||||
// operation.h as BOTH the no-header fallback AND the upper bound that
|
||||
// clamps the server-provided X-Interval-Ms. While we're iterating on the
|
||||
// firmware we want the frame to poll every minute so changes land fast,
|
||||
// but in production we want to honor whatever the app sends (e.g.,
|
||||
// rotationIntervalMinutes=60 → 1 hour, or wakeHour set → ~24 h sleep).
|
||||
// When the firmware stabilizes, split this into two constants:
|
||||
// - FETCH_INTERVAL_MS_FALLBACK (used when no X-Interval-Ms header)
|
||||
// - SLEEP_CLAMP_MIN_MS / SLEEP_CLAMP_MAX_MS (sanity bounds, not the
|
||||
// primary schedule)
|
||||
// and let server values flow through. See operation.h:138 for the cap
|
||||
// site, and tests FW-09/FW-10 for the assertions that will need updating.
|
||||
#define FETCH_INTERVAL_MS 60000 // 1 min deep sleep between polls (DEV value)
|
||||
#endif
|
||||
#define IMAGE_PATH "/img.bin"
|
||||
|
||||
Reference in New Issue
Block a user