Skip to content

Commit

Permalink
Release for V1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Hieromon committed May 4, 2018
1 parent 57cac8f commit aa2d155
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
18 changes: 12 additions & 6 deletions ESPShaker/ESPShaker.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* they can be executed with interactive commands.
* @file ESPShaker.ino
* @author [email protected]
* @version 1.3.1
* @date 2018-04-23
* @version 1.3.2
* @date 2018-05-05
* @copyright MIT license.
*/

Expand All @@ -30,7 +30,7 @@ extern "C" {
extern "C" uint32_t _SPIFFS_start;
extern "C" uint32_t _SPIFFS_end;

#define _VERSION "1.3.1"
#define _VERSION "1.3.2"

class httpHandler : public RequestHandler {
public:
Expand Down Expand Up @@ -114,6 +114,7 @@ String mqttPassword;
int mqttState;
String mqttTopic;

String coreVersion;

bool isNumber(String str) {
uint8_t varLength = (uint8_t)str.length();
Expand Down Expand Up @@ -1466,7 +1467,7 @@ static const commandS commands[] = {
{ "hostname", "[HOSTNAME]", hostname },
{ "http", "{get url}|{on uri PAGE_CONTENT}", http },
{ "mode", "ap|sta|apsta|off", setWiFiMode },
{ "mqtt", "{server SERVER [PORT]}|{con CLIENT_ID AUTH PASS}|{pub {TOPIC PAYLOAD [#r]|stop}}|{sub TOPIC [QoS]}|close", mqtt },
{ "mqtt", "{server SERVER [PORT]}|{con CLIENT_ID AUTH PASS}|{pub {TOPIC PAYLOAD [#r]}}|{sub TOPIC [QoS]|stop}|close", mqtt },
{ "persistent", "on|off", setPersistent },
{ "ping", "REMOTE_HOST", ping },
{ "reset", "", reset },
Expand All @@ -1487,7 +1488,12 @@ void unrecognized(const char* cmd) {
Serial.print("> ");
}

void echoVersion() {
Serial.printf("ESPShaker %s - %08x,Flash:%u,SDK%s,core%s\r\n", _VERSION, ESP.getChipId(), ESP.getFlashChipRealSize(), system_get_sdk_version(), coreVersion.c_str());
}

void help() {
echoVersion();
Serial.println("Commands:");
for (uint8_t i = 0; i < sizeof(commands) / sizeof(struct _command); i++)
Serial.println(String(commands[i].name) + ' ' + String(commands[i].option));
Expand All @@ -1504,9 +1510,9 @@ void setup() {
Cmd.addCommand("help", help);
Cmd.addCommand("?", help);
Cmd.setDefaultHandler(unrecognized);
String coreVersion = ESP.getCoreVersion();
coreVersion = ESP.getCoreVersion();
coreVersion.replace('_', '.');
Serial.printf("ESPShaker %s - %08x,Flash:%u,SDK%s,core%s\r\n", _VERSION, ESP.getChipId(), ESP.getFlashChipRealSize(), system_get_sdk_version(), coreVersion.c_str());
echoVersion();
Serial.println("Type \"help\", \"?\" for commands list.");

showWiFiMode();
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ ESP8266 UART RX buffer size is 128 bytes also ESPShaker has 128 bytes command bu

### Change log

#### [1.3.2] 2018-05-05
- Fixed help text.

#### [1.3.1] 2018-04-22
- Fixed to Arduino core 2.4.1

Expand Down

0 comments on commit aa2d155

Please sign in to comment.