diff options
Diffstat (limited to 'CommandTerminal/CmdWriteProtectedConfig.cpp')
-rw-r--r-- | CommandTerminal/CmdWriteProtectedConfig.cpp | 17 |
1 files changed, 17 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; +} |