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