V1.7
This commit is contained in:
		@ -61,15 +61,23 @@ typedef struct {
 | 
			
		||||
  ErrorKind error_type; // TSErrorKind
 | 
			
		||||
} StateHandle;
 | 
			
		||||
 | 
			
		||||
typedef enum { RELAY_MAIN, RELAY_PRECHARGE } Relay;
 | 
			
		||||
 | 
			
		||||
extern StateHandle state;
 | 
			
		||||
extern int32_t RELAY_BAT_SIDE_VOLTAGE;
 | 
			
		||||
extern int32_t RELAY_ESC_SIDE_VOLTAGE;
 | 
			
		||||
extern int32_t CURRENT_MEASUREMENT;
 | 
			
		||||
extern uint8_t powerground_status;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void sm_init();
 | 
			
		||||
void sm_update();
 | 
			
		||||
void sm_handle_ams_in(const uint8 *data);
 | 
			
		||||
void sm_precharge_discharge_manager();
 | 
			
		||||
void sm_calibrate_powerground();
 | 
			
		||||
void sm_balancing();
 | 
			
		||||
 | 
			
		||||
void sm_check_errors();
 | 
			
		||||
void sm_set_error_source();
 | 
			
		||||
 | 
			
		||||
State sm_update_inactive();
 | 
			
		||||
State sm_update_precharge();
 | 
			
		||||
@ -80,21 +88,12 @@ State sm_update_charging_precharge();
 | 
			
		||||
State sm_update_charging();
 | 
			
		||||
State sm_update_error();
 | 
			
		||||
 | 
			
		||||
typedef enum { RELAY_MAIN, RELAY_PRECHARGE } Relay;
 | 
			
		||||
void sm_set_relay_positions(State state);
 | 
			
		||||
void sm_set_relay(Relay relay, bool closed);
 | 
			
		||||
 | 
			
		||||
void sm_check_battery_temperature(int8_t* id, int16_t* temp);
 | 
			
		||||
int16_t sm_return_cell_temperature(int id);
 | 
			
		||||
int16_t sm_return_cell_voltage(int id);
 | 
			
		||||
 | 
			
		||||
void sm_calibrate_powerground();
 | 
			
		||||
void sm_precharge_discharge_manager();
 | 
			
		||||
 | 
			
		||||
void sm_handle_ams_in(const uint8 *data);
 | 
			
		||||
void sm_check_errors();
 | 
			
		||||
void sm_set_error(ErrorKind error_kind, bool is_errored);
 | 
			
		||||
void sm_test_cycle_states();
 | 
			
		||||
void sm_error_source();
 | 
			
		||||
 | 
			
		||||
#endif /* "INC_STATE_MACHINE_H" */
 | 
			
		||||
		Reference in New Issue
	
	Block a user