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
- 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
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
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>