dev

Dependencies:   MTS-Serial libmDot-mbed5

Fork of Dot-AT-Firmware by MultiTech

Revision:
1:e52ae6584f1c
Child:
14:f9a77400b622
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CommandTerminal/CmdSaveConfig.cpp	Thu Jun 25 10:23:41 2015 -0500
@@ -0,0 +1,17 @@
+#include "CmdSaveConfig.h"
+
+CmdSaveConfig::CmdSaveConfig(mDot* dot) : Command(dot, "Save Configuration", "AT&W", "Save configuration to flash memory")
+{
+    _help = std::string(text()) + ": " + std::string(desc());
+}
+
+
+uint32_t CmdSaveConfig::action(std::vector<std::string> args)
+{
+    if (!_dot->saveConfig()) {
+      setErrorMessage("Failed to save to flash");
+      return 1;
+    }
+    
+    return 0;
+}