feat(DLD110S): 0x24响应追加LOOP_MEASURE_BASE归一化基数(协议V1.1) — 修复第三方variation换算放大4倍问题
This commit is contained in:
@@ -632,6 +632,10 @@ void manage_dbn_ble_default(uint8_t *pkg, uint8_t len)
|
||||
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;
|
||||
/* V1.1: 追加归一化基数 LOOP_MEASURE_BASE (2^19=524288, LE), 供第三方 variation 换算 dL/L */
|
||||
tmp_ble_buf[i++] = (uint8_t)(LOOP_MEASURE_BASE);
|
||||
tmp_ble_buf[i++] = (uint8_t)(LOOP_MEASURE_BASE >> 8);
|
||||
tmp_ble_buf[i++] = (uint8_t)(LOOP_MEASURE_BASE >> 16);
|
||||
|
||||
set_response_buf(&g_buf_ble_response, MAGIC_BYTE_DBN_DEFAULT, _cmd, tmp_ble_buf, i);
|
||||
// PRINT("\nGet_Cjq_param\n");
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
#define HARDWARE_VER_MAIN 4
|
||||
#define HARDWARE_VER_SUB 1
|
||||
|
||||
/* 归一化基数: variation 换算 dL/L 时除以该值 (2^19=524288, 必须与 peripheral_main.c MEASUREMENT_BASE 同步) */
|
||||
#define LOOP_MEASURE_BASE 524288L
|
||||
|
||||
/* 功能模式位 (direction_mode 高4位, 协议保留; 新算法不再消费) */
|
||||
#define FUNCTION_A 0x01 // 二次判断 (已废弃)
|
||||
#define FUNCTION_B 0x02 // 二次判断增强条件判断 (已废弃)
|
||||
|
||||
Reference in New Issue
Block a user