Skip to content

Commit

Permalink
Merge branch 'pr3y:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
whywilson authored Jan 16, 2025
2 parents 7ff3d22 + ec43f0e commit ae376b1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Also, [read our FAQ](https://github.com/pr3y/Bruce/wiki/FAQ)
| Device | CC1101 | NRF24 | Interpreter | FM Radio | PN532 | Mic | BadUSB | RGB Led | Speaker | Fuel Guage | LITE_MODE |
| --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [M5Stack Cardputer](https://shop.m5stack.com/products/m5stack-cardputer-kit-w-m5stamps) | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | NS4168 | :x: | :x: |
| [M5Stack M5StickC PLUS2](https://shop.m5stack.com/products/m5stickc-plus-esp32-pico-mini-iot-development-kit) | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | :ok:¹ | :x: | Tone | :x: | :x: |
| [M5Stack M5StickC PLUS2](https://shop.m5stack.com/products/m5stickc-plus2-esp32-mini-iot-development-kit) | :ok: | :ok: | :ok: | :ok: | :ok: | :ok: | :ok:¹ | :x: | Tone | :x: | :x: |
| [M5Stack M5StickC PLUS](https://shop.m5stack.com/products/m5stickc-plus-esp32-pico-mini-iot-development-kit) | :ok: | :ok: | :x: | :ok: | :ok: | :ok: | :ok:¹ | :x: | Tone | :x: | :x:² |
| [M5Stack M5Core BASIC](https://shop.m5stack.com/products/basic-core-iot-development-kit) | :x: | :x: | :x: | :x: | :x: | :ok: | :ok:¹ | :x: | Tone | :x: | :x: |
| [M5Stack M5Core2 v1.1](https://shop.m5stack.com/products/m5stack-core2-esp32-iot-development-kit-v1-1) | :x: | :x: | :x: | :x: | :x: | :ok: | :ok:¹ | :x: | :x: | :x: | :x: |
Expand Down
4 changes: 0 additions & 4 deletions src/core/serialcmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,6 @@ bool processSerialCommand(String cmd_str) {

if(cmd_str == "webui" ) {
// start the webui
if(!wifiConnected) {
Serial.println("wifiConnect");
wifiConnectMenu(WIFI_AP); // TODO: read mode from config file
}
Serial.println("startWebUi");
startWebUi(true); // MEMO: will quit when check(EscPress)
return true;
Expand Down
28 changes: 5 additions & 23 deletions src/modules/others/webInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,13 @@ WebServer* server=nullptr; // initialise webserver
const char* host = "bruce";
String uploadFolder="";



/**********************************************************************
** Function: webUIMyNet
** Display options to launch the WebUI
**********************************************************************/
void webUIMyNet() {
if (WiFi.status() != WL_CONNECTED) {
if(wifiConnectMenu()) startWebUi(false);
else {
displayError("Wifi Offline");
}
} else {
//If it is already connected, just start the network
startWebUi(false);
}
// On fail installing will run the following line
}


/**********************************************************************
** Function: loopOptionsWebUi
** Display options to launch the WebUI
**********************************************************************/
void loopOptionsWebUi() {
// Definição da matriz "Options"
options = {
{"my Network", [=]() { webUIMyNet(); }},
{"my Network", [=]() { startWebUi(false); }},
{"AP mode", [=]() { startWebUi(true); }},
};

Expand Down Expand Up @@ -493,11 +472,14 @@ server->on("/script.js", HTTP_GET, []() {
void startWebUi(bool mode_ap) {
setupSdCard();

bool keepWifiConnected = false;
if (WiFi.status() != WL_CONNECTED) {
if( mode_ap )
wifiConnectMenu(WIFI_AP);
else
wifiConnectMenu(WIFI_STA);
} else {
keepWifiConnected = true;
}

// configure web server
Expand Down Expand Up @@ -526,7 +508,7 @@ void startWebUi(bool mode_ap) {
MDNS.end();

delay(100);
wifiDisconnect();
if(!keepWifiConnected) wifiDisconnect();
enableCore0WDT();
enableCore1WDT();
enableLoopWDT();
Expand Down
1 change: 1 addition & 0 deletions src/modules/rf/rf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,7 @@ void rf_scan_copy() {
received.key=0;
received.preset="";
received.protocol="";
signals=0;
deinitRfModule();
delay(1500);
goto RestartScan;
Expand Down

0 comments on commit ae376b1

Please sign in to comment.