Browse Source

battery and config header file

namrota ghosh 6 months ago
parent
commit
81f5e39646
2 changed files with 5 additions and 3 deletions
  1. 2 0
      src/battery_data/battery.h
  2. 3 3
      src/config.h

+ 2 - 0
src/battery_data/battery.h

@@ -62,6 +62,8 @@ typedef enum __attribute__((__packed__)){
     STATE_ERROR,
     STATE_ERROR,
 }BatteryChargingState;
 }BatteryChargingState;
 
 
+
+
 typedef struct{
 typedef struct{
     uint8_t slot_id;
     uint8_t slot_id;
     uint16_t pwm_value; //for Power Burning PWM
     uint16_t pwm_value; //for Power Burning PWM

+ 3 - 3
src/config.h

@@ -18,15 +18,15 @@
 #define PWM_MAX_VALUE (320)
 #define PWM_MAX_VALUE (320)
 
 
 // soft overvoltage treshold before getting into the soft overvoltage state
 // soft overvoltage treshold before getting into the soft overvoltage state
-#define SOV_THRESHOLD_MV 6000
+#define SOV_THRESHOLD_MV 5300
 
 
 // hard overvoltage treshold for getting into the hard overvoltage state (error)
 // hard overvoltage treshold for getting into the hard overvoltage state (error)
-#define HOV_THRESHOLD_MV 8000
+#define HOV_THRESHOLD_MV 5500
 
 
 // define the temperature error state
 // define the temperature error state
 #define OVERTEMPERATURE_TRESHOLD 43
 #define OVERTEMPERATURE_TRESHOLD 43
 
 
-#define CONTROLLER_HYSTERESIS 5
+#define CONTROLLER_HYSTERESIS 10
 
 
 typedef struct{
 typedef struct{
      uint8_t txBuffer[I2C_TX_MAX_PACKET_SIZE];
      uint8_t txBuffer[I2C_TX_MAX_PACKET_SIZE];