Skip to content

Commit

Permalink
Supprts erase operand
Browse files Browse the repository at this point in the history
  • Loading branch information
Hieromon committed Sep 3, 2019
1 parent 22e2b63 commit eb31180
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ESPShaker/ESPShaker.ino
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern "C" {
extern "C" uint32_t _SPIFFS_start;
extern "C" uint32_t _SPIFFS_end;

#define _VERSION "1.3.3"
#define _VERSION "1.4"

class httpHandler : public RequestHandler {
public:
Expand Down Expand Up @@ -1432,6 +1432,12 @@ void wifiConfig() {
Serial.println(")");
Serial.println(WiFi.config(stationIP, stationGW, stationNM, stationDNS1, stationDNS2) ? "OK" : "Fail");
}
else {
if (s_stationIP == "erase") {
Serial.println("ESP.eraseConfig");
Serial.println(ESP.eraseConfig() ? "OK" : "Fail");
}
}
Serial.print("> ");
}

Expand Down Expand Up @@ -1475,7 +1481,7 @@ static const commandS commands[] = {
{ "apconfig", "[AP_IP] [GW_IP] [NETMASK]", softAPConfig },
{ "autoconnect", "on|off", autoConnect },
{ "begin", "[SSID [PASSPHRASE]] [#wait]", beginWiFi },
{ "config", "IP GW [NETMASK] [DNS1] [DNS2]", wifiConfig },
{ "config", "{IP GW [NETMASK] [DNS1] [DNS2]}|erase", wifiConfig },
{ "delay", "MILLISECONDS", doDelay },
{ "discon", "[ap]", disconnWiFi },
{ "eeprom", "{addr [ADDRESS]}|{clear BYTE LENGTH}|{write DATA}|{read LENGTH}", eeprom },
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,9 @@ ESP8266 UART RX buffer size is 128 bytes also ESPShaker has 128 bytes command bu

### Change log

#### [1.4] 2019-09-03
- Suppors **erase** operand with **config** command.

#### [1.3.3] 2018-11-28
- Suppors ESP8266 Arduino core release 2.4.2

Expand Down

0 comments on commit eb31180

Please sign in to comment.