@@ -38,4 +38,5 @@ void Battery_ReadState(uint8_t slot_id){
else{
battery_data[slot_id].battery_state = STATE_MEASUREMENT_IN_PROGRESS;
}
-}
+}
+
@@ -4,7 +4,7 @@
#include "src/config.h"
#ifndef BATTERY_H
#define BATTERY_H
-
+#define HYSTERISIS (50)
//Battery states read by Pi
typedef enum{
@@ -42,7 +42,7 @@ typedef enum __attribute((packed))__{
SLOT_ERR_DAC_WRITE_FAILED= (0x26 | 0x80)
} SlotState;
-typedef struct __attribute__((packed)){
+typedef struct __attribute__((packed)){
uint16_t voltage;
int16_t current;
uint16_t temperature;