blob: 46923b3295b87bb833853f07a8d67e35b5480de8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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<std::string> 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;
}
|