diff options
-rw-r--r-- | CommandTerminal/CmdDeviceId.cpp | 6 | ||||
-rw-r--r-- | CommandTerminal/Commands.h | 4 | ||||
-rw-r--r-- | Mode/ModeConfig.cpp | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/CommandTerminal/CmdDeviceId.cpp b/CommandTerminal/CmdDeviceId.cpp index 05d2301..10dc9e8 100644 --- a/CommandTerminal/CmdDeviceId.cpp +++ b/CommandTerminal/CmdDeviceId.cpp @@ -2,7 +2,7 @@ #include <algorithm> CmdDeviceId::CmdDeviceId(mDot* dot, mts::MTSSerial& serial) : - Command(dot, "Device ID", "AT+DI", "Device EUI (unique, set at factory) (8 bytes)"), _serial(serial) + Command(dot, "Device ID", "AT+DI", "Device EUI-64 (MSB) (unique, set at factory) (8 bytes)"), _serial(serial) { _help = std::string(text()) + ": " + std::string(desc()); _usage = "(hex:8)"; @@ -15,7 +15,7 @@ uint32_t CmdDeviceId::action(std::vector<std::string> args) { if (_dot->getVerbose()) _serial.writef("%s: ", name()); - _serial.writef("%s\r\n", mts::Text::bin2hexString(_dot->getDeviceId(), ":").c_str()); + _serial.writef("%s\r\n", mts::Text::bin2hexString(_dot->getDeviceId(), "-").c_str()); } #ifdef DEBUG_MAC else if (args.size() == 2) @@ -28,7 +28,7 @@ uint32_t CmdDeviceId::action(std::vector<std::string> args) if ((code = _dot->setDeviceId(NewEUI)) == mDot::MDOT_OK) { _serial.writef("Set %s: ", name()); - _serial.writef("%s\r\n", mts::Text::bin2hexString(NewEUI, ":").c_str()); + _serial.writef("%s\r\n", mts::Text::bin2hexString(NewEUI, "-").c_str()); } else { std::string error = mDot::getReturnCodeString(code) + " - " + _dot->getLastError(); setErrorMessage(error); diff --git a/CommandTerminal/Commands.h b/CommandTerminal/Commands.h index 22beb41..da1f8bd 100644 --- a/CommandTerminal/Commands.h +++ b/CommandTerminal/Commands.h @@ -28,3 +28,7 @@ #include "CmdDeleteSurveyDataFile.h" #include "CmdDummy.h" + +#ifdef MTS_RADIO_DEBUG_COMMANDS +#include "CmdWriteProtectedConfig.h" +#endif diff --git a/Mode/ModeConfig.cpp b/Mode/ModeConfig.cpp index 6fbeae0..8f869bf 100644 --- a/Mode/ModeConfig.cpp +++ b/Mode/ModeConfig.cpp @@ -54,6 +54,10 @@ ModeConfig::ModeConfig(DOGS102* lcd, ButtonHandler* buttons, mDot* dot, LoRaHand addCommand(new CmdGetSurveyDataFile(_dot, _serial)); addCommand(new CmdDeleteSurveyDataFile(_dot, _serial)); addCommand(new CmdDummy(_dot, "Exit to main menu", "AT+EXIT", "Exit configuration and return to the main menu")); + +#if MTS_RADIO_DEBUG_COMMANDS + addCommand(new CmdWriteProtectedConfig(_dot)); +#endif } void ModeConfig::printHelp() { |