Add regen overcurrent limit
This commit is contained in:
		@ -5,9 +5,10 @@
 | 
			
		||||
 | 
			
		||||
#include "stm32f3xx_hal.h"
 | 
			
		||||
 | 
			
		||||
#define SHUNT_TIMEOUT 300               // ms
 | 
			
		||||
#define SHUNT_THRESH_OVERCURRENT 300000 // mA
 | 
			
		||||
#define SHUNT_THRESH_OVERTEMP 1000      // 1/10 °C
 | 
			
		||||
#define SHUNT_TIMEOUT 300                    // ms
 | 
			
		||||
#define SHUNT_THRESH_OVERCURRENT 300000      // mA
 | 
			
		||||
#define SHUNT_THRESH_OVERCURRENT_REGEN 50000 // mA
 | 
			
		||||
#define SHUNT_THRESH_OVERTEMP 1000           // 1/10 °C
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  int32_t current;     // mA
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user