From: kyz Date: Thu, 18 Dec 2025 01:26:38 +0000 (+0800) Subject: 修正补偿电流计算 X-Git-Url: http://kyz.pub/gitweb/?a=commitdiff_plain;h=9b674adffc02c7343d029702bc43041cab788147;p=yn%2Fcdbs.git 修正补偿电流计算 --- diff --git "a/20240801\345\256\214\346\225\264\347\211\210/\346\211\263\346\211\213\344\270\213\344\275\215\346\234\272\350\275\257\344\273\266/cpbs-202103-20240423/APP/eventmonitoring.c" "b/20240801\345\256\214\346\225\264\347\211\210/\346\211\263\346\211\213\344\270\213\344\275\215\346\234\272\350\275\257\344\273\266/cpbs-202103-20240423/APP/eventmonitoring.c" index b12333a..e3d0089 100644 --- "a/20240801\345\256\214\346\225\264\347\211\210/\346\211\263\346\211\213\344\270\213\344\275\215\346\234\272\350\275\257\344\273\266/cpbs-202103-20240423/APP/eventmonitoring.c" +++ "b/20240801\345\256\214\346\225\264\347\211\210/\346\211\263\346\211\213\344\270\213\344\275\215\346\234\272\350\275\257\344\273\266/cpbs-202103-20240423/APP/eventmonitoring.c" @@ -147,7 +147,7 @@ u16 Get_Compensated_Current(u16 target_current) if (current_battery_voltage < BATTERY_VOLTAGE_80_PERCENT && current_battery_voltage > 0) { // ²¹³¥¹«Ê½£º²¹³¥ºóµçÁ÷ = Ä¿±êµçÁ÷ ¡Á (Âúµçѹ / µ±Ç°µçѹ) - compensated_current = target_current * (FULL_BATTERY_VOLTAGE / current_battery_voltage); + compensated_current = target_current * BATTERY_VOLTAGE_80_PERCENT / current_battery_voltage; // ÏÞÖÆ×î´ó²¹³¥µçÁ÷£¨¿É¸ù¾Ýʵ¼ÊÇé¿öµ÷Õû£© if (compensated_current > ELECTRICITY_PP) diff --git "a/20240801\345\256\214\346\225\264\347\211\210/\346\211\263\346\211\213\344\270\213\344\275\215\346\234\272\350\275\257\344\273\266/cpbs-202103-20240423/APP/eventmonitoring.h" "b/20240801\345\256\214\346\225\264\347\211\210/\346\211\263\346\211\213\344\270\213\344\275\215\346\234\272\350\275\257\344\273\266/cpbs-202103-20240423/APP/eventmonitoring.h" index 91ecacc..3e167f5 100644 --- "a/20240801\345\256\214\346\225\264\347\211\210/\346\211\263\346\211\213\344\270\213\344\275\215\346\234\272\350\275\257\344\273\266/cpbs-202103-20240423/APP/eventmonitoring.h" +++ "b/20240801\345\256\214\346\225\264\347\211\210/\346\211\263\346\211\213\344\270\213\344\275\215\346\234\272\350\275\257\344\273\266/cpbs-202103-20240423/APP/eventmonitoring.h" @@ -45,8 +45,11 @@ #define FULL_BATTERY_VOLTAGE 2948 //Âúµçµçѹ£º20.77v µç·ÉϲâµÃµçѹԼΪ:2.948V #define EMPTY_BATTERY_VOLTAGE 2357 //¼ì²âµçѹ (16.5V/7)*1000 #define BATTERY_RISE_THRESHOLD 3 //¶ÔÓ¦µç³Øµçѹ500mv,ÐèÒª¼ì²é¼ÆË㣬qibin + +//µç³ØµçѹµÍÓÚ18V£¬¶ÔÄ¿±êŤ¾ØµçÁ÷½øÐв¹³¥£¬18V x ·Öѹ 33/233 = 2.549V + // µç³ØµçѹµÍÓÚÕâ¸öÖµ½øÐеçÁ÷²¹³¥ -#define BATTERY_VOLTAGE_80_PERCENT 2459 +#define BATTERY_VOLTAGE_80_PERCENT 2549 #define BATTERY_VOLTAGE_FUNCIONT(Vol) Vol*21000/2948