|
@@ -22,6 +22,7 @@ static void _voltage_notify(void);
|
|
|
static void _temperature_notify(void);
|
|
static void _temperature_notify(void);
|
|
|
static u32 _bms_main_task_handler(void);
|
|
static u32 _bms_main_task_handler(void);
|
|
|
static void _debug_timer_handler(shark_timer_t *t);
|
|
static void _debug_timer_handler(shark_timer_t *t);
|
|
|
|
|
+static void _process_power_down(void);
|
|
|
|
|
|
|
|
static bms_state_t _bms_state;
|
|
static bms_state_t _bms_state;
|
|
|
static int pcb_temp = 100;
|
|
static int pcb_temp = 100;
|
|
@@ -171,6 +172,11 @@ void start_aux_power(int start){
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void system_power_down(void){
|
|
|
|
|
+ bms_health()->powerdown_lower_voltage = 1;
|
|
|
|
|
+ _process_power_down();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
#define Health_Success 0
|
|
#define Health_Success 0
|
|
|
#define Health_Discharger_Failt 1
|
|
#define Health_Discharger_Failt 1
|
|
|
#define Health_charger_Fault 2
|
|
#define Health_charger_Fault 2
|