Working version
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
|
||||
#define CAN_ID_SLAVE_ERROR 0x001
|
||||
#define CAN_ID_AMS_SLAVE_HEARTBEAT_BASE 0x600
|
||||
#define CAN_HEARTBEAT_TX_TIMEOUT 5 /* ms */
|
||||
#define CAN_HEARTBEAT_TX_TIMEOUT 10 /* ms */
|
||||
|
||||
void ams_can_init(CAN_HandleTypeDef* ams, CAN_HandleTypeDef* car);
|
||||
|
||||
|
||||
@ -19,6 +19,8 @@
|
||||
#define CELL_OV_THRESHOLD 55100 // 4.2V
|
||||
#define CELL_UV_THRESHOLD 34100 // 2.6V
|
||||
|
||||
#define BQ_MEASUREMENT_INTERVAL 250 // ms
|
||||
|
||||
extern uint16_t cell_voltages[N_CELLS];
|
||||
extern uint16_t max_voltage, min_voltage;
|
||||
|
||||
|
||||
@ -54,6 +54,7 @@ extern uint8_t slave_id;
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* USER CODE BEGIN EM */
|
||||
#define MAIN_LOOP_PERIOD 100 /* ms */
|
||||
#define ERROR_CHECK_START 1000 /* ms */
|
||||
#define AMS_ERROR_TX_TIMEOUT 2 /* ms */
|
||||
#define THRESH_UV 32768 /* 2.5V */
|
||||
#define THRESH_OV 55050 /* 4.2V */
|
||||
|
||||
Reference in New Issue
Block a user