comparison Small_CPU/Src/batteryGasGauge.c @ 662:1b995079c045 Betatest

PSCR Mode
author heinrichs weikamp
date Tue, 14 Dec 2021 15:36:10 +0100
parents aa286a4926c2
children 079bb5b22c06
comparison
equal deleted inserted replaced
661:87bee7cc77b3 662:1b995079c045
26 #include "batteryGasGauge.h" 26 #include "batteryGasGauge.h"
27 #include "baseCPU2.h" 27 #include "baseCPU2.h"
28 #include "stm32f4xx_hal.h" 28 #include "stm32f4xx_hal.h"
29 #include "i2c.h" 29 #include "i2c.h"
30 30
31 static float battery_f_voltage = 6.0; /* max assumed voltage */ 31 static float battery_f_voltage = BATTERY_DEFAULT_VOLTAGE; /* max assumed voltage */
32 static float battery_f_charge_percent = 0; 32 static float battery_f_charge_percent = 0;
33 33
34 #define BGG_BATTERY_OFFSET (26123) //; 65536-(3,35Ah/0,085mAh) 34 #define BGG_BATTERY_OFFSET (26123) //; 65536-(3,35Ah/0,085mAh)
35 #define BGG_BATTERY_DIVIDER (394) //; 3,35Ah/0,085mAh/100 [%] 35 #define BGG_BATTERY_DIVIDER (394) //; 3,35Ah/0,085mAh/100 [%]
36 36