diff options
| author | Mike Fiore <mfiore@multitech.com> | 2015-11-18 15:46:37 -0600 |
|---|---|---|
| committer | Mike Fiore <mfiore@multitech.com> | 2015-11-18 15:46:37 -0600 |
| commit | d48510e9c3a57753ff4b33b00e0c61a2b39ff9a1 (patch) | |
| tree | f04f39f7287a6bca826a6c22179b0542cd16f36f /CommandTerminal/CmdFactoryDefault.cpp | |
| parent | 94990163d2b694373eb5b2b8ccc4d002aad4ecd9 (diff) | |
| parent | ce5c78c53be8d66da4a2cccdf18b622c0b77e773 (diff) | |
| download | mtdot-box-evb-factory-firmware-d48510e9c3a57753ff4b33b00e0c61a2b39ff9a1.tar.gz mtdot-box-evb-factory-firmware-d48510e9c3a57753ff4b33b00e0c61a2b39ff9a1.tar.bz2 mtdot-box-evb-factory-firmware-d48510e9c3a57753ff4b33b00e0c61a2b39ff9a1.zip | |
Merge branch 'atcommands'
configuration needs to be pulled out of main and implemented as a Mode object
Conflicts:
main.cpp
Diffstat (limited to 'CommandTerminal/CmdFactoryDefault.cpp')
| -rw-r--r-- | CommandTerminal/CmdFactoryDefault.cpp | 23 |
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; +} + |
