From c8047a9017a6512e341638614dc6960c856abcd4 Mon Sep 17 00:00:00 2001 From: hamza Date: Fri, 24 May 2024 18:56:49 +0300 Subject: [PATCH] fixed a build issue --- Core/Inc/can.h | 3 --- Core/Src/can.c | 5 ++--- Core/Src/main.c | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Core/Inc/can.h b/Core/Inc/can.h index 4b2b471..aecdb06 100644 --- a/Core/Inc/can.h +++ b/Core/Inc/can.h @@ -1,8 +1,5 @@ #include "stm32f3xx_hal.h" -#include "stm32f3xx_hal_can.h" -#include "stm32f3xx_hal_def.h" -#include "state_machine.h" #include #define CAN_ID_IN 0x501 diff --git a/Core/Src/can.c b/Core/Src/can.c index 0aaf81b..a8e239a 100644 --- a/Core/Src/can.c +++ b/Core/Src/can.c @@ -7,9 +7,8 @@ #include "can.h" #include "AMS_HighLevel.h" -#include "TMP1075.h" +//#include "TMP1075.h" #include "can-halal.h" -#include void can_init(CAN_HandleTypeDef* hcan) { ftcan_init(hcan); } @@ -22,6 +21,6 @@ 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 + //data[0] = state. (sm_get_state_code() << 5); //save 5 bit since codes are from 0-6 //ftcan_transmit(id, data, sizeof(data)); } diff --git a/Core/Src/main.c b/Core/Src/main.c index e574010..024678b 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -121,7 +121,7 @@ int main(void) sm_init(); tmp1075_init(&hi2c1); AMS_Init(&hspi1); - ams_can_init(&hcan); + can_init(&hcan); uint32_t target_time = HAL_GetTick() + 10000; /* USER CODE END 2 */ @@ -135,7 +135,7 @@ int main(void) /* USER CODE BEGIN 3 */ AMS_Loop(); - ams_can_send_status(); + can_handle_send_status(); } /* USER CODE END 3 */ }