Added status command to terminal interface

This commit is contained in:
Xose Pérez
2017-02-16 00:20:55 +01:00
parent eed5acc346
commit f67dc8a24b

View File

@@ -66,6 +66,11 @@ void settingsSetup() {
ESP.reset();
});
Embedis::command( F("STATUS"), [](Embedis* e) {
Serial.printf("Free heap: %d bytes\n", ESP.getFreeHeap());
e->response(Embedis::OK);
});
Embedis::command( F("EEPROM.DUMP"), [](Embedis* e) {
for (unsigned int i = 0; i < SPI_FLASH_SEC_SIZE; i++) {
if (i % 16 == 0) Serial.printf("\n[%04X] ", i);