Commit Graph

8 Commits

Author SHA1 Message Date
Colonel Panic 1232d9f607 dashboard: surface the CMD:* protocol in the UI
Wires the host command endpoints added in the previous commit
(/api/flock/{status,dump_prev,dump_live,clear_prev,clear_live}) into
index.html as a five-button row under the Sniffer connect controls.
Buttons stay hidden until the device is connected and are auto-revealed
on the loadStatus() poll, the connect-success callback, and any
flock_reconnected socket event; hidden again on flock_disconnected.

  - Pull Prev / Pull Live  → POST dump_{prev,live}, show "Pulling…"
                              busy state, toast the final count
  - Status                  → GET /api/flock/status, toast a compact
                              line: det=N ouis=N prev=yes ch=N heap=KKB
                              up=Ns
  - Clear Prev / Clear Live → POST clear_{prev,live} after a confirm()
                              dialog (destructive)

A top-right toast element (#flockToast) handles all command feedback
with success/warning/error/info colour bands; auto-dismisses after 4s
(6s for status, so the user has time to read).

Replay detections are visually distinguished in the detection cards:
a new "FLASH" or "RAM" badge (purple for SPIFFS, blue for live RAM)
appears next to the GPS tag, and the card itself gets a subtle left
border + tint via .detection-item.replay.

Socket events also wired: replay_detection pushes into both
detections[] and cumulativeDetections[]; flock_replay_complete /
flock_error trigger their own toasts so other browser tabs see the
result of a pull triggered elsewhere; flock_status / flock_clear are
logged only (the REST caller already gets toast feedback).

All button click handlers disable the other command buttons during a
request so a user can't fire two dumps in parallel against the same
serial port (which would interleave at the firmware end — the protocol
serializes one CMD: at a time).
2026-05-10 20:32:26 -04:00
Colonel Panic 3606f1f812 Overhaul firmware: BLE-only detection, web dashboard, GPS wardriving, session persistence
Complete rewrite of standalone Flock-You firmware:
- Remove WiFi promiscuous mode, all detection is now BLE-only
- Add web dashboard served on AP "flockyou" at 192.168.4.1
- GPS wardriving via phone browser Geolocation API
- SPIFFS session persistence with auto-save every 60s
- Prior session tab (PREV) survives reboots
- KML export for Google Earth (current + prior session)
- JSON/CSV export with GPS coordinates
- Serial JSON output for Flask live ingestion
- Crow call boot sounds with detection/heartbeat alerts
- 200 unique device storage with FreeRTOS mutex
- Flask app: add KML import endpoint, GPS data handling
- Update platformio.ini with AsyncWebServer, ArduinoJson 7, SPIFFS partition
- Rewrite README to reflect current functionality
2026-02-07 12:53:58 -05:00
Colonel Panic 661def11eb Add files via upload 2025-08-29 20:37:40 -04:00
Colonel Panic 04d76e1274 Add files via upload 2025-08-29 16:23:04 -04:00
Colonel Panic 8497469d2e Add files via upload 2025-08-28 20:21:54 -04:00
Colonel Panic c919e3be9f Add files via upload 2025-08-26 13:13:13 -04:00
Colonel Panic 811540a913 Add files via upload 2025-08-23 21:31:33 -04:00
Colonel Panic 0ee2e6c664 Add files via upload 2025-08-23 14:47:43 -04:00