- Dashboard hub broadcasts motion state changes immediately on transition (idle↔motion) via BroadcastMotionState; periodic state snapshots include motion_states for new client init - Per-link presence badge (green CLEAR / red MOTION) rendered in link list alongside global presence indicator in status bar - Amplitude mean time-series chart (60 s rolling window) for selected link, line segments colored by motion state at each sample - Fix: links created from JSON link_active/state events now initialize ampHistory and lastAmpSample so time-series accumulates from first frame Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
558 B
C
14 lines
558 B
C
#pragma once
|
|
|
|
#include "esp_err.h"
|
|
#include "cJSON.h"
|
|
|
|
// provision_listen_window opens a 10-second serial provisioning window.
|
|
// Prints "SPAXEL READY\n" and reads {"provision": {...}}\n from UART0.
|
|
// Responds with {"ok": true, "mac": "..."}\n on success.
|
|
// Safe to call even if no host is connected — times out cleanly.
|
|
void provision_listen_window(void);
|
|
|
|
// provision_write_nvs writes the provisioning JSON blob to NVS.
|
|
// Expected keys: wifi_ssid, wifi_pass, node_id, node_token, ms_mdns, ms_port, debug.
|
|
esp_err_t provision_write_nvs(cJSON *prov);
|