19 lines
		
	
	
		
			312 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			312 B
		
	
	
	
		
			C
		
	
	
	
	
	
#ifndef INC_SOC_ESTIMATION_H
 | 
						|
#define INC_SOC_ESTIMATION_H
 | 
						|
 | 
						|
#include <stdint.h>
 | 
						|
 | 
						|
extern float current_soc;
 | 
						|
 | 
						|
void soc_init();
 | 
						|
void soc_update();
 | 
						|
 | 
						|
typedef struct {
 | 
						|
  uint16_t ocv;
 | 
						|
  float soc;
 | 
						|
} ocv_soc_pair_t;
 | 
						|
extern ocv_soc_pair_t OCV_SOC_PAIRS[];
 | 
						|
float soc_for_ocv(uint16_t ocv);
 | 
						|
 | 
						|
#endif // INC_SOC_ESTIMATION_H
 |