diff options
author | Leon Lindenfelser <llindenfelser@multitech.com> | 2015-11-18 11:16:11 -0600 |
---|---|---|
committer | Leon Lindenfelser <llindenfelser@multitech.com> | 2015-11-18 11:16:11 -0600 |
commit | ce5c78c53be8d66da4a2cccdf18b622c0b77e773 (patch) | |
tree | ec4b374b788034fdd182be841699a51abc84ec6e /CommandTerminal/CmdData.cpp | |
parent | f484beed77531d7ef2da65cf049fe9c4ac6b7d08 (diff) | |
download | mtdot-box-evb-factory-firmware-ce5c78c53be8d66da4a2cccdf18b622c0b77e773.tar.gz mtdot-box-evb-factory-firmware-ce5c78c53be8d66da4a2cccdf18b622c0b77e773.tar.bz2 mtdot-box-evb-factory-firmware-ce5c78c53be8d66da4a2cccdf18b622c0b77e773.zip |
Added functionality to get the guts of these commands working with storage
mapped into unused mDot commands. Over write the mDot defaults in these
storage locations with the appropriate defaults for these 5 commands.
Diffstat (limited to 'CommandTerminal/CmdData.cpp')
-rw-r--r-- | CommandTerminal/CmdData.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/CommandTerminal/CmdData.cpp b/CommandTerminal/CmdData.cpp index 339fc4b..4b31de6 100644 --- a/CommandTerminal/CmdData.cpp +++ b/CommandTerminal/CmdData.cpp @@ -1,5 +1,7 @@ #include "CmdData.h" +//SPECIAL NOTE: +Data is stored in the LoraConfig StartUpMode field. We decided to use 5 LoRaConfig locations, +// that are not used for the DotBox, for the 5 DotBox settings... +minsize, +maxsize, +minpwr, +maxpwr and +data. CmdData::CmdData(mDot* dot, mts::MTSSerial& serial) : Command(dot, "Data", "AT+DATA", "Enable/disable sending survey data results packet to the network server upon each successful survey. (0: off, 1: on)"), _serial(serial) { @@ -14,15 +16,14 @@ uint32_t CmdData::action(std::vector<std::string> args) { if (_dot->getVerbose()) _serial.writef("%s: ", name()); -//ToDo: Change from _dot->getPublicNetwork() to the structure we will use for this. - _serial.writef("%d\r\n", _dot->getPublicNetwork()); + _serial.writef("%d\r\n", _dot->getStartUpMode()); } else if (args.size() == 2) { int32_t code; bool enable = (args[1] == "1"); - if ((code = _dot->setPublicNetwork(enable)) != mDot::MDOT_OK) { + if ((code = _dot->setStartUpMode(enable)) != mDot::MDOT_OK) { std::string error = mDot::getReturnCodeString(code) + " - " + _dot->getLastError(); setErrorMessage(error); return 1; |