fixed a typo
This commit is contained in:
parent
3844636225
commit
eae0400190
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#define CAN_ID_IN 0x501
|
#define CAN_ID_IN 0x501
|
||||||
#define CAN_ID_OUT 0x502
|
#define CAN_ID_OUT 0x502
|
||||||
#define CAN_ID_LOGGING 0x503
|
#define CAN_ID_LOG 0x503
|
||||||
|
|
||||||
// Every X ms, send message
|
// Every X ms, send message
|
||||||
#define CAN_STATUS_FREQ 1000
|
#define CAN_STATUS_FREQ 1000
|
||||||
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
uint8_t id_to_log;
|
uint8_t id_to_log;
|
||||||
uint8_t last_message[8];
|
uint8_t last_message[8];
|
||||||
|
uint32_t can_status_timer, can_log_timer, can_timeout_timer;
|
||||||
|
|
||||||
void can_init(CAN_HandleTypeDef* hcan) {
|
void can_init(CAN_HandleTypeDef* hcan) {
|
||||||
ftcan_init(hcan);
|
ftcan_init(hcan);
|
||||||
@ -115,7 +116,7 @@ void can_handle_send_log(){
|
|||||||
data[1] = module.cellVoltages[id_to_log] >> 8;
|
data[1] = module.cellVoltages[id_to_log] >> 8;
|
||||||
data[2] = module.cellVoltages[id_to_log];
|
data[2] = module.cellVoltages[id_to_log];
|
||||||
data[3] = tmp1075_temps[id_to_log] >> 4;
|
data[3] = tmp1075_temps[id_to_log] >> 4;
|
||||||
ftcan_transmit(CAN_ID_LOGGING, data, 4);
|
ftcan_transmit(CAN_ID_LOG, data, 4);
|
||||||
id_to_log++;
|
id_to_log++;
|
||||||
if (id_to_log == 13)
|
if (id_to_log == 13)
|
||||||
id_to_log = 0;
|
id_to_log = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user