From 097dbc88bfd6303fbc6b08e95cf49a16936a4d67 Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Wed, 16 Dec 2015 12:48:24 -0600 Subject: update AT command help, add AT+EXIT command so it gets displayed in help --- CommandTerminal/CmdDummy.cpp | 13 +++++++++++++ CommandTerminal/CmdDummy.h | 16 ++++++++++++++++ CommandTerminal/CmdGetSurveyDataFile.cpp | 2 +- CommandTerminal/CmdMaximumPower.cpp | 2 +- CommandTerminal/CmdMaximumSize.cpp | 2 +- CommandTerminal/CmdMinimumPower.cpp | 2 +- CommandTerminal/CmdMinimumSize.cpp | 2 +- CommandTerminal/CmdNetworkKey.cpp | 2 +- CommandTerminal/CmdTxDataRate.cpp | 2 +- CommandTerminal/CmdTxPower.cpp | 2 +- CommandTerminal/Commands.h | 2 ++ 11 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 CommandTerminal/CmdDummy.cpp create mode 100644 CommandTerminal/CmdDummy.h (limited to 'CommandTerminal') diff --git a/CommandTerminal/CmdDummy.cpp b/CommandTerminal/CmdDummy.cpp new file mode 100644 index 0000000..4ef3ced --- /dev/null +++ b/CommandTerminal/CmdDummy.cpp @@ -0,0 +1,13 @@ +#include "CmdDummy.h" + +CmdDummy::CmdDummy(mDot* dot, const char* name, const char* txt, const char* dsc) : Command(dot, name, txt, dsc) +{ + _help = std::string(text()) + ": " + std::string(desc()); +} + + +uint32_t CmdDummy::action(std::vector args) +{ + return 0; +} + diff --git a/CommandTerminal/CmdDummy.h b/CommandTerminal/CmdDummy.h new file mode 100644 index 0000000..8551147 --- /dev/null +++ b/CommandTerminal/CmdDummy.h @@ -0,0 +1,16 @@ +#ifndef __CMDDUMMY_H__ +#define __CMDDUMMY_H__ + +#include "Command.h" + +class CmdDummy : public Command { + +public: + + CmdDummy(mDot* dot, const char* name, const char* text, const char* desc); + virtual uint32_t action(std::vector args); + +private: +}; + +#endif // __CMDDUMMY_H__ diff --git a/CommandTerminal/CmdGetSurveyDataFile.cpp b/CommandTerminal/CmdGetSurveyDataFile.cpp index 3fa4e46..79a42f5 100644 --- a/CommandTerminal/CmdGetSurveyDataFile.cpp +++ b/CommandTerminal/CmdGetSurveyDataFile.cpp @@ -3,7 +3,7 @@ #include "MTSLog.h" CmdGetSurveyDataFile::CmdGetSurveyDataFile(mDot* dot, mts::MTSSerial& serial) : - Command(dot, "Get Survey Data File", "AT+GSDF", "Outputs the survey data file to the command port"), _serial(serial) + Command(dot, "Get Survey Data File", "AT+GSDF", "Outputs the survey data file contents to the command port"), _serial(serial) { _help = std::string(text()) + ": " + std::string(desc()); } diff --git a/CommandTerminal/CmdMaximumPower.cpp b/CommandTerminal/CmdMaximumPower.cpp index d12c11f..b2ce106 100644 --- a/CommandTerminal/CmdMaximumPower.cpp +++ b/CommandTerminal/CmdMaximumPower.cpp @@ -3,7 +3,7 @@ //SPECIAL NOTE: Maximum power is stored in the LoraConfig WakeMode 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. CmdMaximumPower::CmdMaximumPower(mDot* dot, mts::MTSSerial& serial) : - Command(dot, "Maximum Power", "AT+MAXPWR", "Set the maximum transmit power for sweep survey mode"), _serial(serial) + Command(dot, "Maximum Power", "AT+MAXPWR", "Set the maximum transmit power for survey sweep mode"), _serial(serial) { _help = std::string(text()) + ": " + std::string(desc()); _usage = "(2-20)"; diff --git a/CommandTerminal/CmdMaximumSize.cpp b/CommandTerminal/CmdMaximumSize.cpp index 3679c72..8ac740d 100644 --- a/CommandTerminal/CmdMaximumSize.cpp +++ b/CommandTerminal/CmdMaximumSize.cpp @@ -3,7 +3,7 @@ //SPECIAL NOTE: Maximum size is stored in the LoraConfig WakeDelay 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. CmdMaximumSize::CmdMaximumSize(mDot* dot, mts::MTSSerial& serial) : - Command(dot, "Maximum Size", "AT+MAXSIZE", "Set the maximum payload size for sweep survey mode"), _serial(serial) + Command(dot, "Maximum Size", "AT+MAXSIZE", "Set the maximum payload size for survey sweep mode"), _serial(serial) { _help = std::string(text()) + ": " + std::string(desc()); _usage = "(11-242)"; diff --git a/CommandTerminal/CmdMinimumPower.cpp b/CommandTerminal/CmdMinimumPower.cpp index f3c997e..bd36cfd 100644 --- a/CommandTerminal/CmdMinimumPower.cpp +++ b/CommandTerminal/CmdMinimumPower.cpp @@ -3,7 +3,7 @@ //SPECIAL NOTE: Minimum power is stored in the LoraConfig WakeTimeout 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. CmdMinimumPower::CmdMinimumPower(mDot* dot, mts::MTSSerial& serial) : - Command(dot, "Minimum Power", "AT+MINPWR", "Set the minimum transmit power for sweep survey mode"), _serial(serial) + Command(dot, "Minimum Power", "AT+MINPWR", "Set the minimum transmit power for survey sweep mode"), _serial(serial) { _help = std::string(text()) + ": " + std::string(desc()); _usage = "(2-20)"; diff --git a/CommandTerminal/CmdMinimumSize.cpp b/CommandTerminal/CmdMinimumSize.cpp index 5315af7..ce21f9b 100644 --- a/CommandTerminal/CmdMinimumSize.cpp +++ b/CommandTerminal/CmdMinimumSize.cpp @@ -3,7 +3,7 @@ //SPECIAL NOTE: Minimum size is stored in the LoraConfig WakeInterval 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. CmdMinimumSize::CmdMinimumSize(mDot* dot, mts::MTSSerial& serial) : - Command(dot, "Minimum Size", "AT+MINSIZE", "Set the minimum payload size for sweep survey mode"), _serial(serial) + Command(dot, "Minimum Size", "AT+MINSIZE", "Set the minimum payload size for survey sweep mode"), _serial(serial) { _help = std::string(text()) + ": " + std::string(desc()); _usage = "(11-242)"; diff --git a/CommandTerminal/CmdNetworkKey.cpp b/CommandTerminal/CmdNetworkKey.cpp index f85725c..575ff96 100644 --- a/CommandTerminal/CmdNetworkKey.cpp +++ b/CommandTerminal/CmdNetworkKey.cpp @@ -1,7 +1,7 @@ #include "CmdNetworkKey.h" CmdNetworkKey::CmdNetworkKey(mDot* dot, mts::MTSSerial& serial) : - Command(dot, "Network Key", "AT+NK", "Configured network key/passphrase (App Key in LoraMac) ## AT+NK=0,hex AT+NK=1,passphrase (Net key = cmac(passphrase)) (16 bytes)"), + Command(dot, "Network Key", "AT+NK", "Configured network key/passphrase (App Key in LoraMac) AT+NK=0,hex AT+NK=1,passphrase (Net key = cmac(passphrase)) (16 bytes)"), _serial(serial) { _help = std::string(text()) + ": " + std::string(desc()); diff --git a/CommandTerminal/CmdTxDataRate.cpp b/CommandTerminal/CmdTxDataRate.cpp index 2d38f42..3bbbebe 100644 --- a/CommandTerminal/CmdTxDataRate.cpp +++ b/CommandTerminal/CmdTxDataRate.cpp @@ -1,7 +1,7 @@ #include "CmdTxDataRate.h" CmdTxDataRate::CmdTxDataRate(mDot* dot, mts::MTSSerial& serial) : - Command(dot, "Tx Data Rate", "AT+TXDR", "Set the Tx data rate for all channels"), _serial(serial) + Command(dot, "Tx Data Rate", "AT+TXDR", "Set the Tx data rate for LoRa demo mode"), _serial(serial) { _help = std::string(text()) + ": " + std::string(desc()); diff --git a/CommandTerminal/CmdTxPower.cpp b/CommandTerminal/CmdTxPower.cpp index 8816b46..978d3b5 100644 --- a/CommandTerminal/CmdTxPower.cpp +++ b/CommandTerminal/CmdTxPower.cpp @@ -1,7 +1,7 @@ #include "CmdTxPower.h" CmdTxPower::CmdTxPower(mDot* dot, mts::MTSSerial& serial) : - Command(dot, "Tx Power", "AT+TXP", "Set the Tx power for all channels"), _serial(serial) + Command(dot, "Tx Power", "AT+TXP", "Set the Tx power for LoRa demo mode"), _serial(serial) { _help = std::string(text()) + ": " + std::string(desc()); _usage = "(2-20)"; diff --git a/CommandTerminal/Commands.h b/CommandTerminal/Commands.h index 5caa6e4..22beb41 100644 --- a/CommandTerminal/Commands.h +++ b/CommandTerminal/Commands.h @@ -26,3 +26,5 @@ #include "CmdData.h" #include "CmdGetSurveyDataFile.h" #include "CmdDeleteSurveyDataFile.h" + +#include "CmdDummy.h" -- cgit v1.2.3