Skip to content

Commit

Permalink
Set IDs to arbitrary value
Browse files Browse the repository at this point in the history
  • Loading branch information
caiodasilva2005 committed Feb 24, 2024
1 parent 23fec10 commit 3e5e24d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Core/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "cmsis_os.h"
#include <stdlib.h>

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
Expand All @@ -33,7 +34,7 @@

/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */

#define BOARD_ID 1
/* USER CODE END PD */

/* Private macro -------------------------------------------------------------*/
Expand Down Expand Up @@ -113,9 +114,13 @@ int main(void)
MX_USART2_UART_Init();

/* USER CODE BEGIN 2 */
msb_temp_t *temp_data;
msb_knuckle_t *knuckle_data;
msb_central_t *central_data;
msb_temp_t *temp_data = malloc(sizeof(msb_temp_t));
msb_knuckle_t *knuckle_data = malloc(sizeof(msb_knuckle_t));
msb_central_t *central_data = malloc(sizeof(msb_central_t));

temp_data->id = BOARD_ID;
knuckle_data->id = BOARD_ID;
central_data->id = BOARD_ID;
/* USER CODE END 2 */

/* Init scheduler */
Expand Down

0 comments on commit 3e5e24d

Please sign in to comment.