summaryrefslogtreecommitdiff
path: root/CommandTerminal/CmdFactoryDefault.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CommandTerminal/CmdFactoryDefault.cpp')
-rw-r--r--CommandTerminal/CmdFactoryDefault.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/CommandTerminal/CmdFactoryDefault.cpp b/CommandTerminal/CmdFactoryDefault.cpp
new file mode 100644
index 0000000..3e366e8
--- /dev/null
+++ b/CommandTerminal/CmdFactoryDefault.cpp
@@ -0,0 +1,23 @@
+#include "CmdFactoryDefault.h"
+
+CmdFactoryDefault::CmdFactoryDefault(mDot* dot) : Command(dot, "Reset Factory Defaults", "AT&F", "Reset current configuration to factory defaults")
+{
+ _help = std::string(text()) + ": " + std::string(desc());
+}
+
+
+uint32_t CmdFactoryDefault::action(std::vector<std::string> args)
+{
+ _dot->resetConfig();
+
+//Factory defaults for the DotBox.
+ _dot->setWakeDelay(242); //DotBox +MaxSize is stored here. Default is 242.
+ _dot->setWakeInterval(11); //DotBox +MinSize is stored here. Default is 11.
+ _dot->setWakeMode(20); //DotBox +MaxPwr is stored here. Default is 20.
+ _dot->setWakeTimeout(2); //DotBox +MinPwr is stored here. Default is 2.
+ _dot->setStartUpMode(0); //DotBox +Data is stored here. Default is 0.
+
+ _dot->resetNetworkSession();
+ return 0;
+}
+