fixed a build issue
This commit is contained in:
parent
572749b202
commit
c8047a9017
@ -1,8 +1,5 @@
|
|||||||
|
|
||||||
#include "stm32f3xx_hal.h"
|
#include "stm32f3xx_hal.h"
|
||||||
#include "stm32f3xx_hal_can.h"
|
|
||||||
#include "stm32f3xx_hal_def.h"
|
|
||||||
#include "state_machine.h"
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define CAN_ID_IN 0x501
|
#define CAN_ID_IN 0x501
|
||||||
|
@ -7,9 +7,8 @@
|
|||||||
#include "can.h"
|
#include "can.h"
|
||||||
|
|
||||||
#include "AMS_HighLevel.h"
|
#include "AMS_HighLevel.h"
|
||||||
#include "TMP1075.h"
|
//#include "TMP1075.h"
|
||||||
#include "can-halal.h"
|
#include "can-halal.h"
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
void can_init(CAN_HandleTypeDef* hcan) { ftcan_init(hcan); }
|
void can_init(CAN_HandleTypeDef* hcan) { ftcan_init(hcan); }
|
||||||
|
|
||||||
@ -22,6 +21,6 @@ with format of:
|
|||||||
*/
|
*/
|
||||||
void can_handle_send_status() {
|
void can_handle_send_status() {
|
||||||
static uint8_t data[8];
|
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));
|
//ftcan_transmit(id, data, sizeof(data));
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ int main(void)
|
|||||||
sm_init();
|
sm_init();
|
||||||
tmp1075_init(&hi2c1);
|
tmp1075_init(&hi2c1);
|
||||||
AMS_Init(&hspi1);
|
AMS_Init(&hspi1);
|
||||||
ams_can_init(&hcan);
|
can_init(&hcan);
|
||||||
|
|
||||||
uint32_t target_time = HAL_GetTick() + 10000;
|
uint32_t target_time = HAL_GetTick() + 10000;
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
@ -135,7 +135,7 @@ int main(void)
|
|||||||
/* USER CODE BEGIN 3 */
|
/* USER CODE BEGIN 3 */
|
||||||
AMS_Loop();
|
AMS_Loop();
|
||||||
|
|
||||||
ams_can_send_status();
|
can_handle_send_status();
|
||||||
}
|
}
|
||||||
/* USER CODE END 3 */
|
/* USER CODE END 3 */
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user