修正补偿电流计算
authorkyz <kongyuzhong@google.com>
Thu, 18 Dec 2025 01:26:38 +0000 (09:26 +0800)
committerkyz <kongyuzhong@google.com>
Thu, 18 Dec 2025 01:26:38 +0000 (09:26 +0800)
20240801完整版/扳手下位机软件/cpbs-202103-20240423/APP/eventmonitoring.c
20240801完整版/扳手下位机软件/cpbs-202103-20240423/APP/eventmonitoring.h

index b12333a504b4156e96925fae4413608b6f67e0d1..e3d008940f9fd8e726dc68250560606244cd2d9a 100644 (file)
@@ -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)
index 91ecaccc5c6df66d6e37028946dbe52ed6021a18..3e167f5f0de05d8f4eb12728577d6f0f5a3f9b31 100644 (file)
 #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