From f484beed77531d7ef2da65cf049fe9c4ac6b7d08 Mon Sep 17 00:00:00 2001 From: Leon Lindenfelser Date: Mon, 16 Nov 2015 16:18:09 -0600 Subject: Added all the new dotbox commands with some detail work still needed --- CommandTerminal/CmdExit.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 CommandTerminal/CmdExit.cpp (limited to 'CommandTerminal/CmdExit.cpp') diff --git a/CommandTerminal/CmdExit.cpp b/CommandTerminal/CmdExit.cpp new file mode 100644 index 0000000..46923b3 --- /dev/null +++ b/CommandTerminal/CmdExit.cpp @@ -0,0 +1,19 @@ +#include "CmdExit.h" + +CmdExit::CmdExit(mDot* dot, mts::MTSSerial& serial) : + Command(dot, "Exit", "AT+EXIT", "Exit from command mode to main menu"), _serial(serial) +{ + _help = std::string(text()) + ": " + std::string(desc()); +} + +uint32_t CmdExit::action(std::vector args) +{ +//ToDo: Probably setting or clearing a flag to indicate to some other task to shut down command mode and display the main menu. + if (!_dot->saveConfig()) { + setErrorMessage("Failed to save to flash"); + return 1; + } + + return 0; + +} -- cgit v1.2.3