Skip to content

Commit

Permalink
20240529.1
Browse files Browse the repository at this point in the history
- Increased Zigbee flashing speed to 500000
- English interface: visual corrections and logical perception #49 Thanks @SAOPP 馃弳
- Adjusted input field length restrictions for mqtt broker #52 Thanks @dzerrenner 馃弳
- Fix Zigbee flashing using USB
    **Before** flash enable *Flash Mode* using Web UI/MQTT or a button. **After** flash *Restart* Zigbee using Web UI/MQTT.
  • Loading branch information
xyzroe committed May 29, 2024
1 parent 7aced54 commit 4d94517
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
10 changes: 10 additions & 0 deletions src/etc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,23 @@ void zigbeeEnableBSL()
printLogMsg("ZB enable BSL");
CCTool.enterBSL();
printLogMsg("Now you can flash CC2652!");
if (systemCfg.workMode == WORK_MODE_USB)
{
Serial.updateBaudRate(500000);
Serial2.updateBaudRate(500000);
}
}

void zigbeeRestart()
{
printLogMsg("ZB RST begin");
CCTool.restart();
printLogMsg("ZB restart was done");
if (systemCfg.workMode == WORK_MODE_USB)
{
Serial.updateBaudRate(systemCfg.serialSpeed);
Serial2.updateBaudRate(systemCfg.serialSpeed);
}
}

void usbModeSet(usbMode mode)
Expand Down
9 changes: 6 additions & 3 deletions src/web.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ void handleGeneral()
String result;

doc[hwBtnIsKey] = vars.hwBtnIs;
//doc[hwUartSelIsKey] = vars.hwUartSelIs;
// doc[hwUartSelIsKey] = vars.hwUartSelIs;
doc[hwLedPwrIsKey] = vars.hwLedPwrIs;
doc[hwLedUsbIsKey] = vars.hwLedUsbIs;

Expand Down Expand Up @@ -1056,7 +1056,7 @@ void handleGeneral()
serializeJson(doc, result);
serverWeb.sendHeader(respHeaderName, result);

DynamicJsonDocument zones(10240);
DynamicJsonDocument zones(8000);
String results;

JsonArray zonesArray = zones.to<JsonArray>();
Expand All @@ -1065,6 +1065,9 @@ void handleGeneral()
zonesArray.add(timeZones[i].zone);
}

size_t usedMemory = zones.memoryUsage();
LOGD("Zones used: %s bytes", String(usedMemory));

serializeJson(zones, results);
serverWeb.sendHeader(respTimeZonesName, results);
}
Expand Down Expand Up @@ -1488,7 +1491,7 @@ void handleTools()
DynamicJsonDocument doc(512);

doc[hwBtnIsKey] = vars.hwBtnIs;
//doc[hwUartSelIsKey] = vars.hwUartSelIs;
// doc[hwUartSelIsKey] = vars.hwUartSelIs;
doc[hwLedPwrIsKey] = vars.hwLedPwrIs;
doc[hwLedUsbIsKey] = vars.hwLedUsbIs;
// doc["hostname"] = systemCfg.hostname;
Expand Down
2 changes: 1 addition & 1 deletion src/zb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void zbEraseNV(void *pvParameters)

void flashZbUrl(String url)
{
Serial2.updateBaudRate(460800);
Serial2.updateBaudRate(500000);
float last_percent = 0;

const char *tagZB_FW_info = "ZB_FW_info";
Expand Down

0 comments on commit 4d94517

Please sign in to comment.