feat(opt): 光耦输出模式升级 — DLD_OUTPUT_MODE 枚举 + direction_mode 低四位取值

- 新增 DLD_OUTPUT_MODE 枚举: 7种模式(复位/纯地感/纯雷达/或/与/人车混行/ETC)
- g_fm_radar_input_disable → g_output_radar_mode: 从 function_mode bit1 改为 direction_mode & 0x0F
- 仅模式0(复位)已实现, 1~6 暂为 no-op
- BLE 回读字段改为 direction_mode 完整字节
- rs485_700bs.c: 注释块重排(无功能变更)
- docs: 更新开发日志
This commit is contained in:
wangfq
2026-07-28 09:26:09 +08:00
parent ffaa5cd733
commit f5edab43c2
6 changed files with 391 additions and 325 deletions
@@ -430,7 +430,7 @@ static void unpack_pkg_set_cjq_param(uint8_t *pkg, uint8_t len)
g_function_mode = (g_loop_cng_unit.direction_mode >> 4) & 0x0F;
g_fm_700bs_disable = g_function_mode & 0x01;
g_fm_radar_input_disable = (g_function_mode >> 1) & 0x01;
g_output_radar_mode = g_loop_cng_unit.direction_mode & 0x0F;
g_hold_time = g_loop_cng_unit.exist_mode * 20 * 5;
g_freq_sens = (g_loop_cng_unit.sensitvity > 0) ? (g_loop_cng_unit.sensitvity - 1) : 0;
@@ -634,7 +634,7 @@ void manage_dbn_ble_default(uint8_t *pkg, uint8_t len)
tmp_ble_buf[i++] = g_loop_sens_list.total << 4;
tmp_ble_buf[i++] = (g_loop_power_up_state == 0) ? 1 : ((uint8_t)(g_loop_cut_amount));
tmp_ble_buf[i++] = (uint8_t)(g_loop_cut_amount >> 8);
tmp_ble_buf[i++] = g_function_mode;
tmp_ble_buf[i++] = g_loop_cng_unit.direction_mode;
set_response_buf(&g_buf_ble_response, MAGIC_BYTE_DBN_DEFAULT, _cmd, tmp_ble_buf, i);
// PRINT("\nGet_Cjq_param\n");