diff options
author | Mike Fiore <mfiore@multitech.com> | 2016-01-08 10:05:04 -0600 |
---|---|---|
committer | Mike Fiore <mfiore@multitech.com> | 2016-01-08 10:05:04 -0600 |
commit | 1d6bcd0116b9082f42035da8bb2be1868eb12dee (patch) | |
tree | 1f435f61c43374651f26ada56bb22a04f5e3e31c /CommandTerminal | |
parent | adc3d703dd1945b2b06c80dd7252cb4e9cc4f485 (diff) | |
download | mtdot-box-evb-factory-firmware-1d6bcd0116b9082f42035da8bb2be1868eb12dee.tar.gz mtdot-box-evb-factory-firmware-1d6bcd0116b9082f42035da8bb2be1868eb12dee.tar.bz2 mtdot-box-evb-factory-firmware-1d6bcd0116b9082f42035da8bb2be1868eb12dee.zip |
add CmdWriteProtectedConfig
Diffstat (limited to 'CommandTerminal')
-rw-r--r-- | CommandTerminal/CmdWriteProtectedConfig.cpp | 17 | ||||
-rw-r--r-- | CommandTerminal/CmdWriteProtectedConfig.h | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/CommandTerminal/CmdWriteProtectedConfig.cpp b/CommandTerminal/CmdWriteProtectedConfig.cpp new file mode 100644 index 0000000..7609024 --- /dev/null +++ b/CommandTerminal/CmdWriteProtectedConfig.cpp @@ -0,0 +1,17 @@ +#include "CmdWriteProtectedConfig.h" + +CmdWriteProtectedConfig::CmdWriteProtectedConfig(mDot* dot) : + Command(dot, "Write Protected Config", "AT&WP", "Write protected config to flash (DeviceId and Frequency Band)") +{ + _help = std::string(text()) + ": " + std::string(desc()); +} + +uint32_t CmdWriteProtectedConfig::action(std::vector<std::string> args) +{ + if (!_dot->saveProtectedConfig()) { + setErrorMessage("Failed to save to flash"); + return 1; + } + + return 0; +} diff --git a/CommandTerminal/CmdWriteProtectedConfig.h b/CommandTerminal/CmdWriteProtectedConfig.h new file mode 100644 index 0000000..f31d2bd --- /dev/null +++ b/CommandTerminal/CmdWriteProtectedConfig.h @@ -0,0 +1,17 @@ + +#ifndef __CMDWRITEPROTECTEDCONFIG_H__ +#define __CMDWRITEPROTECTEDCONFIG_H__ + +#include "Command.h" + +class CmdWriteProtectedConfig : public Command { + +public: + + CmdWriteProtectedConfig(mDot* dot); + virtual uint32_t action(std::vector<std::string> args); + +private: +}; + +#endif // __CMDWRITEPROTECTEDCONFIG_H__ |