solving reviews pt4 + some changes
This commit is contained in:
@@ -34,8 +34,8 @@ The 'udp_broadcast_init(uint16_t x_pos, uint16_t y_pos)' function does 4 things:
|
||||
void main(void){
|
||||
...
|
||||
if (udp_broadcast_init(270,255) != ERR_OK){
|
||||
...
|
||||
}
|
||||
...
|
||||
}
|
||||
...
|
||||
}
|
||||
```
|
||||
@@ -53,9 +53,16 @@ This function can be used seperately from [err_t udp_broadcast_init(uint16_t x_p
|
||||
|
||||
void main(void){
|
||||
...
|
||||
if (udp_broadcast_init(270,255) != ERR_OK || udp_broadcast_connection_init() != ERR_OK){
|
||||
...
|
||||
}
|
||||
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){
|
||||
LOG_WARN(TAG,"error initializing udp connection, check warnings from udp_broadcast_init() or udp_broadcast_connection_init()");
|
||||
}
|
||||
|
||||
connected:
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user