there can only be one
there's only one owner struct needed, thus adding a static one in the c file is better than having the main file to initialize one and pass it on again and again,. some code wasn't needed anymore and some had to change
This commit is contained in:
@@ -128,13 +128,13 @@ int main(void)
|
||||
llfs_init();
|
||||
|
||||
// Initialize the UDP broadcast service
|
||||
owner_details_t owner;
|
||||
udp_broadcast_init();
|
||||
|
||||
if(!udp_broadcast_set_owner_details(&owner, "Joran", "Van Nieuwenhoven")){
|
||||
if (udp_broadcast_init() != ERR_OK && udp_broadcast_connection_init() != ERR_OK){
|
||||
LOG_WARN(TAG,"error initializing udp connection");
|
||||
}
|
||||
if (!udp_broadcast_set_owner_details("Joran", "Van Nieuwenhoven")){
|
||||
LOG_WARN(TAG,"error setting owner's details");
|
||||
}
|
||||
LOG_DEBUG(TAG,"%s",udp_broadcast_get_owner_details_reply(&owner));
|
||||
LOG_DEBUG(TAG,"%s",udp_broadcast_get_owner_details_reply());
|
||||
/* USER CODE END 2 */
|
||||
|
||||
/* Infinite loop */
|
||||
|
||||
Reference in New Issue
Block a user