solving reviews pt5

This commit is contained in:
joran2738
2023-11-26 13:53:24 +01:00
parent a73080b1fc
commit 4eb6264a27
2 changed files with 18 additions and 27 deletions

View File

@@ -136,20 +136,12 @@ int main(void)
// Initialize the UDP broadcast service
if (udp_broadcast_init(10,255) == ERR_OK){
goto connected;
}
LOG_WARN(TAG,"error initializing udp connection, trying again in 500ms");
HAL_Delay(500);
if(udp_broadcast_connection_init() != ERR_OK){
if (udp_broadcast_init(10,255) != ERR_OK){
LOG_WARN(TAG,"error initializing udp connection, check warnings from udp_broadcast_init() or udp_broadcast_connection_init()");
}
connected:
if (udp_broadcast_set_owner_details("Joran", "Van Nieuwenhoven") != ERR_OK){
LOG_WARN(TAG,"error setting owner's details");
}
/* USER CODE END 2 */
/* Infinite loop */