Skip to content

Commit

Permalink
add checkMAC function to dev menu
Browse files Browse the repository at this point in the history
  • Loading branch information
rennancockles committed Oct 3, 2024
1 parent 44170d3 commit daeddc4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/core/menu_items/ConfigMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "core/display.h"
#include "core/settings.h"
#include "core/i2c_finder.h"
#include "core/wifi_common.h"

void ConfigMenu::optionsMenu() {
options = {
Expand All @@ -24,6 +25,7 @@ void ConfigMenu::optionsMenu() {

void ConfigMenu::devMenu(){
options = {
{"MAC Address", [=]() { checkMAC(); }},
{"I2C Finder", [=]() { find_i2c_addresses(); }},
{"Back", [=]() { optionsMenu(); }},
};
Expand Down
8 changes: 8 additions & 0 deletions src/core/wifi_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,11 @@ bool wifiConnectMenu(bool isAP) {
return wifiConnected;
}

void checkMAC() {
drawMainBorderWithTitle("MAC ADDRESS");
padprintln("\n");
padprintln(WiFi.macAddress());

delay(200);
while(!checkAnyKeyPress()) { delay(80); }
}
4 changes: 3 additions & 1 deletion src/core/wifi_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ bool wifiConnect(String ssid, int encryptation, bool isAP = false);

void wifiDisconnect();

bool wifiConnectMenu( bool isAP = false);
bool wifiConnectMenu( bool isAP = false);

void checkMAC();

0 comments on commit daeddc4

Please sign in to comment.