Skip to content

Commit

Permalink
removed random mac setting
Browse files Browse the repository at this point in the history
mac address is now clientid
refactored code from settings to page_wifi
  • Loading branch information
yenon committed Apr 26, 2024
1 parent 318ff2f commit 2d5be50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/page_wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ static void page_wifi_mask_password(lv_obj_t *obj, int size) {

static bool page_wifi_is_valid_mac_address(const char mac_address[]) {
for (int i = 0; i < 17; i++) {
// first byte has to be even to be a valid broadcast address
// first byte has to be even to be a valid MAC address for our usecase
if (i == 1 && (mac_address[i] != '0' && mac_address[i] != '2' && mac_address[i] != '4' && mac_address[i] != '6' && mac_address[i] != '8' && mac_address[i] != 'a' && mac_address[i] != 'A' && mac_address[i] != 'c' && mac_address[i] != 'C' && mac_address[i] != 'e' && mac_address[i] != 'E')) {
return false;
}
Expand Down

0 comments on commit 2d5be50

Please sign in to comment.