11 Commits

Author SHA1 Message Date
936e547dc3 feat(detect): add debounce for alert/collision and tune default thresholds
- stdc_post_process.c: add consecutive frame counters for left/right alert
  (5 frames) and collision_risk (3 frames) to suppress single-frame noise
- raise alert threshold defaults to 0.20 across all classes; tree_alert
  raised to 0.30 (trees are common background, prone to false positives)
- grass_roi default raised from 0.75 to 0.80
- remove per-frame verbose log from stdc_post_process.c (consolidated
  into app_header_init.c)
- app_header_init.c: add STDC-VIO / STDC-COL / STDC-ALT tuning logs
  showing actual%/threshold% side-by-side for field calibration
- ini/host_stream.ini, kp_firmware.c: sync fallback defaults to match
2026-07-29 17:04:31 +08:00
b2321fcdca feat(detect): make detection thresholds runtime-tunable via BLE SET / INI
Replace 11 compile-time THR_* #defines with runtime float globals
(g_thr_grass_roi, g_thr_*_collision, g_thr_*_alert) defined in
stdc_post_process.c and exposed via extern in the header.

- ini/host_stream.ini: add [detect] section with integer promille values
- kp_firmware.c: read [detect] section at startup, log initial values
- event_recorder.c: add 11 BLE SET handlers (THR_GRASS_ROI,
  THR_PERSON/CAR/TREE/BUNKER/POND_COL, THR_PERSON/CAR/TREE/BUNKER/POND_ALT)
  each with range validation (1-1000), runtime update, and INI persistence
- app_header_init.c: rename log field mov= to moving= for clarity
2026-07-19 22:52:08 +08:00
2081c7b1f5 feat(upload): update OOB upload URL format and make CAN speeds INI-configurable
- Change upload URL path: golf.cgi -> golf-golface.cgi
- Add upload_dev INI key (1=dev, appends &dev=1 to URL)
- Change query params: ?filename= -> ?did={device_id}&vid={event_id}
- Add event_recorder_init params: device_id, dev_mode, speed_normal/alert/stop
- Make CAN speed limits configurable via [can] speed_normal/alert/stop in INI
  (replaces hardcoded SPEED_LIMIT_* macros with runtime static vars)
- Fix build_targz: use tar -C + mkdir -p for BusyBox compat;
  use open()+lseek() instead of stat() (struct stat ABI mismatch on target)
- Extend TEST_UPLOAD snapshot poll timeout: 5s -> 15s; same lseek fix
- Add BLE SET command: persist_ini_int() for runtime INI parameter update
- Fix app_header_init: elapsed_us long -> long long (overflow guard)
- Remove verbose debug printf from mcp2515 reset/send paths
- can_bus: wrap CTL log printf in #if 1 for easy toggle
2026-07-11 18:01:21 +08:00
83e2256192 Add Test_Upload item for development/product cloud 2026-07-06 15:02:11 +08:00
aa75c47772 ROI view points optimizion 2026-07-02 09:48:55 +08:00
41c0a781f2 Add remote control function with LED blinking test 2026-06-17 17:30:10 +08:00
cd96e33c62 feat: BLE plain-text cmd, AT probe fix, INI sed persist, log buffering
bt_uart.c:
- Reader thread: accept plain-text (non-JSON) lines from BLE app;
  routes directly to extra_cmd_cb — test commands no longer need
  JSON wrapping
- bt_uart_probe_and_upgrade(): fix AT+BAUD7 sequence — reopen fd at
  115200 before sending AT+NAME/AT+RESET (was sending on stale 9600 fd)
- bt_uart_send_json(): replace blocking mutex_lock with 200 ms trylock
  retry to avoid deadlock if writer thread dies holding the queue mutex
- Reader select timeout 500 ms → 200 ms for faster plain-text flush

buzzer.c:
- buzzer_set_pattern(): write s_pattern directly then trylock+signal,
  so callers never block on the buzzer thread's mutex

can_bus.c:
- Add debug printf in can_bus_send_control_cmd() (temporary)

event_recorder.c:
- TEST_MODE_TIMEOUT_SEC 60 → 300 (5 min, enough for full test run)

kp_firmware.c:
- Persist INI keys via sed in-place instead of iniparser_dump_ini,
  preserving comments and original file structure
- setvbuf stdout/stderr to line-buffered so tee log appears immediately

Add GF_AI_Box_Test_Guide (.md/.docx/.pdf) and uclibc_compat.c
2026-06-14 15:41:30 +08:00
286291fcfd feat(buzzer): add GPIO64 buzzer module with pattern-based alerts
New buzzer.h/buzzer.c: background pthread drives gpio64 with three
patterns (GRASS 500/500ms, ALERT 300/200ms, COLLISION 100/100ms).
Integrated into fire_collision_warning(), fire_alert(), and grass
state machine in event_recorder.c; buzzer_init() called after
can_bus_init() in kp_firmware.c.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 18:09:54 +08:00
839100c0e1 BT handshake function complete 2026-06-08 14:49:20 +08:00
a3f3b2f8fc fix hdmi mode DrawBox amd BT output 2026-04-13 10:41:38 +08:00
9d7d9073a5 add source codes 2026-04-12 17:47:54 +08:00