Add clone STA MAC

This commit is contained in:
Just Call Me Koko
2025-04-03 14:47:37 -04:00
parent 4dd856999f
commit 4004e4e6d0

View File

@@ -1981,13 +1981,31 @@ void MenuFunctions::RunSetup()
// Populate the menu with buttons // Populate the menu with buttons
for (int i = 0; i < access_points->size(); i++) { for (int i = 0; i < access_points->size(); i++) {
// This is the menu node // This is the menu node
this->addNodes(&wifiAPMenu, access_points->get(i).essid, TFTCYAN, NULL, 255, [this, i](){ this->addNodes(&wifiAPMenu, access_points->get(i).essid, TFTLIME, NULL, 255, [this, i](){
this->changeMenu(&genAPMacMenu); this->changeMenu(&genAPMacMenu);
wifi_scan_obj.RunSetMac(access_points->get(i).bssid, true); wifi_scan_obj.RunSetMac(access_points->get(i).bssid, true);
}); });
} }
this->changeMenu(&wifiAPMenu); this->changeMenu(&wifiAPMenu);
}); });
this->addNodes(&setMacMenu, "Clone STA MAC", TFTMAGENTA, NULL, CLEAR_ICO, [this](){
// Add the back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
this->changeMenu(wifiAPMenu.parentMenu);
});
// Populate the menu with buttons
for (int i = 0; i < stations->size(); i++) {
// This is the menu node
this->addNodes(&wifiAPMenu, macToString(stations->get(i).mac), TFTMAGENTA, NULL, 255, [this, i](){
this->changeMenu(&genAPMacMenu);
wifi_scan_obj.RunSetMac(stations->get(i).mac, false);
});
}
this->changeMenu(&wifiAPMenu);
});
#endif #endif
// Menu for generating and setting access point MAC (just goes bacK) // Menu for generating and setting access point MAC (just goes bacK)