From adc3d703dd1945b2b06c80dd7252cb4e9cc4f485 Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Fri, 8 Jan 2016 09:27:22 -0600 Subject: allow changes to protected config if built with debug macros MTS_RADIO_DEBUG_COMMANDS and DEBUG_MAC --- CommandTerminal/CmdDeviceId.cpp | 6 +++--- CommandTerminal/Commands.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'CommandTerminal') 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 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 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 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 -- cgit v1.2.3