From 76c6f753fae3cc84ebb0f129d10aff2fb5c9720f Mon Sep 17 00:00:00 2001 From: chen <15335560115@163.com> Date: 星期五, 08 八月 2025 16:56:23 +0800 Subject: [PATCH] 免布线基站V1.13,修改电量百分比算法,使能显示到100% --- keil/include/main/main.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keil/include/main/main.c b/keil/include/main/main.c index a195c02..535653b 100644 --- a/keil/include/main/main.c +++ b/keil/include/main/main.c @@ -163,13 +163,13 @@ { bat_percent = 0; } - else if(fVoltage_mv > 3500) + else if(fVoltage_mv > 3260) { bat_percent = 100; } else { - bat_percent = ((fVoltage_mv - 3000) /8); + bat_percent = ((fVoltage_mv - 3000) /3); } //LOG_INFO(TRACE_MODULE_APP, "The voltage is %d ,percent is %%%d \r\n",fVoltage_mv,bat_percent); } @@ -240,7 +240,7 @@ group_id=g_com_map[GROUP_ID]; memcpy(&dev_id ,&g_com_map[DEV_ID],2); tag_frequency=1000/g_com_map[COM_INTERVAL]; -g_com_map[VERSION] = (1<<8)|12; +g_com_map[VERSION] = (1<<8)|13; LOG_INFO(TRACE_MODULE_APP,"设备ID: %x .\r\n",dev_id); LOG_INFO(TRACE_MODULE_APP,"固件版本:UWB-免布线信标 V%d.%d. \r\n",g_com_map[VERSION]>>8,g_com_map[VERSION]&0xff); } -- Gitblit v1.9.3