solving reviews pt4 + some changes
This commit is contained in:
@@ -20,16 +20,21 @@
|
||||
#include "lcd_api.h"
|
||||
|
||||
// Defines used by UDP callback
|
||||
#define UDP_BROADCAST_MAX_DATA_SIZE 63 // Define the maximum expected data size
|
||||
#define UDP_BROADCAST_UDP_QUESTION1 "Where are you?v1.0" // Expected question from UDP client
|
||||
#define UDP_BROADCAST_FUNC_LEN 7
|
||||
#define UDP_BROADCAST_MAX_DATA_SIZE ((UDP_BROADCAST_MAX_NAME_SIZE * 2) - 2 + 25) // Define the maximum expected data size
|
||||
#define UDP_BROADCAST_UDP_QUESTION1 "Where are you?v1.0" // Expected question from UDP client
|
||||
#define UDP_BROADCAST_MAX_FUNC_LEN 7
|
||||
#define UDP_BROADCAST_MAX_COLON_COMMA_COUNT 4
|
||||
|
||||
// Defines used by owner details
|
||||
#define UDP_BROADCAST_MAX_NAME_SIZE 21 // Code automatically leaves 1 char for '\0' (actual length = length - 1)
|
||||
#define UDP_BROADCAST_MAX_REPLY_SIZE 120 // Code automatically leaves 1 char for '\0' (actual length = length - 1)
|
||||
#define UDP_BROADCAST_MAX_MAC_ADDR_LEN 19
|
||||
#define UDP_BROADCAST_MAX_EXTRA_REPLY_CHARS 27
|
||||
#define UDP_BROADCAST_MAX_REPLY_SIZE (UDP_BROADCAST_MAX_MAC_ADDR_LEN + sizeof(UDP_BROADCAST_REPLY_MIDDLE_TEXT) + (UDP_BROADCAST_MAX_NAME_SIZE * 2) + UDP_BROADCAST_MAX_REPLY_SIZE_EXTRA)
|
||||
#define UDP_BROADCAST_REPLY_MIDDLE_TEXT "is present and my owner is"
|
||||
|
||||
#define UDP_BROADCAST_MAX_MAC_ADDR_LEN 19 // Format is: "xx:xx:xx:xx:xx:xx"
|
||||
#define UDP_BROADCAST_MAX_NAME_SIZE 21 // Code automatically leaves 1 char for '\0' (actual length = length - 1)
|
||||
#define UDP_BROADCAST_MAX_REPLY_SIZE_EXTRA 20 // Just a bit extra
|
||||
|
||||
#define UDP_BROADCAST_LCD_NAME_PRE_TEXT "New owner: "
|
||||
#define UDP_BROADCAST_LCD_TEXT_SIZE (strlen(UDP_BROADCAST_LCD_NAME_PRE_TEXT) + UDP_BROADCAST_MAX_NAME_SIZE)
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user