Initial commit
This commit is contained in:
38
Core/Inc/modStateOfCharge.h
Normal file
38
Core/Inc/modStateOfCharge.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef __MODSTATEOFCHARGE_H
|
||||
#define __MODSTATEOFCHARGE_H
|
||||
|
||||
#include "stdint.h"
|
||||
#include "stdbool.h"
|
||||
#include "modPowerElectronics.h"
|
||||
#include "modConfig.h"
|
||||
|
||||
typedef struct {
|
||||
float generalStateOfCharge;
|
||||
float generalStateOfHealth;
|
||||
float remainingCapacityAh;
|
||||
float remainingCapacityWh;
|
||||
} modStateOfChargeStructTypeDef;
|
||||
|
||||
|
||||
extern float real_capacity;
|
||||
extern float previous_capacity;
|
||||
extern float previous_SoC;
|
||||
//static float current_SoC = 0;
|
||||
extern float soc_diff;
|
||||
extern float capacity_diff;
|
||||
extern uint8_t SoC_Save_Flag;
|
||||
|
||||
typedef enum {
|
||||
EVENT_FULL = 0,
|
||||
EVENT_EMPTY,
|
||||
} modStateOfChargeVoltageEventTypeDef;
|
||||
|
||||
modStateOfChargeStructTypeDef* modStateOfChargeInit(modPowerElectronicsPackStateTypedef *packState, modConfigGeneralConfigStructTypedef *generalConfigPointer);
|
||||
void modStateOfChargeProcess(void);
|
||||
bool modStateOfChargeStoreAndLoadDefaultStateOfCharge(void);
|
||||
bool modStateOfChargeStoreStateOfCharge(void);
|
||||
bool modStateOfChargeLoadStateOfCharge(void);
|
||||
bool modStateOfChargePowerDownSave(void);
|
||||
void modStateOfChargeVoltageEvent(modStateOfChargeVoltageEventTypeDef eventType);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user