From 695971002ae5473c4e17842fa5c21539e4dfc558 Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Sat, 25 Oct 2025 17:34:41 +0800 Subject: [PATCH] =?utf8?q?=E5=A2=9E=E5=8A=A0=E9=9B=B7=E9=B8=9F=E7=94=B5?= =?utf8?q?=E6=B1=A0=E6=9B=B2=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../battery/service/battery_driver.cpp | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/code/sdk/zhihui/services/battery/service/battery_driver.cpp b/code/sdk/zhihui/services/battery/service/battery_driver.cpp index 8f740d467..c11b77afa 100644 --- a/code/sdk/zhihui/services/battery/service/battery_driver.cpp +++ b/code/sdk/zhihui/services/battery/service/battery_driver.cpp @@ -233,6 +233,29 @@ float battery_ntc_map[][2]={ float battery_percent_map[][2]={ +#ifdef BOARD_LEINIAO + {4.2,100}, + {4.182,95}, + {4.165,90}, + {4.148,85}, + {4.120,80}, + {4.090,75}, + {4.060,70}, + {4.020,65}, + {3.980,60}, + {3.930,55}, + {3.890,50}, + {3.840,45}, + {3.780,40}, + {3.710,35}, + {3.650,30}, + {3.580,25}, + {3.500,20}, + {3.440,15}, + {3.380,10}, + {3.330,5}, + {3.3,0} +#else {4.3,100}, {4.264,95}, {4.228,90}, @@ -254,10 +277,14 @@ float battery_percent_map[][2]={ {3.652,10}, {3.41,5}, {3.3,0} +#endif }; - +#ifdef BOARD_LEINIAO +#define batteryservice_VOLTAGE_MAX (4.2f) +#else #define batteryservice_VOLTAGE_MAX (4.3f) +#endif #define batteryservice_VOLTAGE_MIN (3.3f) static uint32_t g_adc_sample_times = 0; -- 2.17.1