加了个测试系统标定的函数,可以通过终端修改
This commit is contained in:
parent
bb4e10bf74
commit
8aa0449fbb
|
@ -471,4 +471,22 @@ static void SYS_Set_RtcProductTime(int argc, char **argv)
|
||||||
}
|
}
|
||||||
MSH_CMD_EXPORT(SYS_Set_RtcProductTime, "SYS_Set_RtcProductTime");
|
MSH_CMD_EXPORT(SYS_Set_RtcProductTime, "SYS_Set_RtcProductTime");
|
||||||
|
|
||||||
|
//测试系统标定值修改
|
||||||
|
static void TEST_SYS_Calibartion(int argc, char **argv)
|
||||||
|
{
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
int calibartion_valve = atoi(argv[1]);
|
||||||
|
uint8_t calibration_buf[2] = {0};
|
||||||
|
calibration_buf[0] = calibartion_valve & 0xFF; // 低字节
|
||||||
|
calibration_buf[1] = (calibartion_valve >> 8) & 0xFF; // 高字节
|
||||||
|
Flash_Sys_Cfg(kAlarmLValueId, calibration_buf, 2);
|
||||||
|
LOG_D("标定值修改为 = %d", Flash_Get_SysCfg(kAlarmLValueId));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG_E("TEST_SYS_Calibartion 0~4095");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MSH_CMD_EXPORT(TEST_SYS_Calibartion, "修改系统标定值");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: mbw
|
* @Author: mbw
|
||||||
* @Date: 2024-12-03 10:31:45
|
* @Date: 2024-12-03 10:31:45
|
||||||
* @LastEditors: mbw && 1600520629@qq.com
|
* @LastEditors: mbw && 1600520629@qq.com
|
||||||
* @LastEditTime: 2024-12-17 15:40:10
|
* @LastEditTime: 2024-12-17 15:43:58
|
||||||
* @FilePath: \ble_bjq_ch303rct6_ml307\bsp\src\bsp_bt.c
|
* @FilePath: \ble_bjq_ch303rct6_ml307\bsp\src\bsp_bt.c
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
|
@ -377,8 +377,8 @@ static void Bt_Thread_Entry(void *parameter)
|
||||||
// valve[0].valve_mac[4] = 0x53;
|
// valve[0].valve_mac[4] = 0x53;
|
||||||
// valve[0].valve_mac[5] = 0x5C;
|
// valve[0].valve_mac[5] = 0x5C;
|
||||||
//
|
//
|
||||||
Flash_Set_Mac_Addr(valve[0].valve_mac, 0);
|
// Flash_Set_Mac_Addr(valve[0].valve_mac, 0);
|
||||||
Flash_Set_Valve_Num(1);
|
// Flash_Set_Valve_Num(1);
|
||||||
|
|
||||||
lwrb_init(&bt_lwrb_rx, bt_rx_buffer, sizeof(bt_rx_buffer));
|
lwrb_init(&bt_lwrb_rx, bt_rx_buffer, sizeof(bt_rx_buffer));
|
||||||
lwrb_reset(&bt_lwrb_rx);
|
lwrb_reset(&bt_lwrb_rx);
|
||||||
|
|
Loading…
Reference in New Issue