This commit is contained in:
2024-05-24 19:06:34 +02:00
parent 61e455dfcd
commit b87a0ca55c
3 changed files with 36 additions and 55 deletions

View File

@ -9,6 +9,7 @@
#include "AMS_HighLevel.h"
//#include "TMP1075.h"
#include "can-halal.h"
#include "state_machine.h"
void can_init(CAN_HandleTypeDef* hcan) { ftcan_init(hcan); }
@ -20,7 +21,7 @@ with format of:
*/
void can_handle_send_status() {
static uint8_t data[8];
//data[0] = state. (sm_get_state_code() << 5); //save 5 bit since codes are from 0-6
//ftcan_transmit(id, data, sizeof(data));
static uint8_t data[8] = {};
data[0] = (state.current_state << 5); //save 5 bit since codes are from 0-6
ftcan_transmit(CAN_ID_OUT, data, sizeof(data));
}