few changes for RTS/CTS control
Dependencies: MTS-Serial libmDot mbed-rtos mbed
Fork of mDot_AT_firmware by
Diff: CommandTerminal/CmdDisplayConfig.cpp
- Revision:
- 9:ff62b20f7000
- Parent:
- 4:666017851052
--- a/CommandTerminal/CmdDisplayConfig.cpp Mon Apr 04 13:17:44 2016 +0000 +++ b/CommandTerminal/CmdDisplayConfig.cpp Mon Apr 04 09:00:31 2016 -0500 @@ -9,6 +9,7 @@ } uint32_t CmdDisplayConfig::action(std::vector<std::string> args) { + _serial.writef("Device ID:\t\t"); _serial.writef("%s\r\n", mts::Text::bin2hexString(_dot->getDeviceId(), ":").c_str()); @@ -40,8 +41,14 @@ _serial.writef("Network Join Retries:\t%u\r\n", _dot->getJoinRetries()); + _serial.writef("Preserve Session:\t%s\r\n", _dot->getPreserveSession() ? "on" : "off"); + _serial.writef("Join Byte Order:\t%s\r\n", _dot->getJoinByteOrder() ? "MSB" : "LSB"); + _serial.writef("Join Delay:\t\t%d\r\n", _dot->getJoinDelay()); + + _serial.writef("App Port:\t\t%d\r\n", _dot->getAppPort()); + _serial.writef("Link Check Threshold:\t"); if (_dot->getLinkCheckThreshold() == 0) { _serial.writef("off\r\n"); @@ -70,6 +77,8 @@ _serial.writef("%u\r\n", _dot->getAck()); } + _serial.writef("Packet Repeat:\t\t%d\r\n", _dot->getRepeat()); + _serial.writef("Encryption:\t\t%s\r\n", _dot->getAesEncryption() ? "on" : "off"); _serial.writef("CRC:\t\t\t%s\r\n", _dot->getCrc() ? "on" : "off"); _serial.writef("Adaptive Data Rate:\t%s\r\n", _dot->getAdr() ? "on" : "off"); @@ -77,27 +86,50 @@ _serial.writef("Verbose Response:\t%s\r\n", _dot->getVerbose() ? "on" : "off"); _serial.writef("Tx Frequency:\t\t%lu\r\n", _dot->getTxFrequency()); - _serial.writef("Tx Data Rate:\t\t%s\r\n", mDot::DataRateStr(_dot->getTxDataRate()).c_str()); + + _serial.writef("Tx Data Rate:\t\tDR%d - %s\r\n", _dot->getTxDataRate(), _dot->getDateRateDetails(_dot->getTxDataRate()).c_str()); _serial.writef("Tx Power:\t\t%u\r\n", _dot->getTxPower()); + _serial.writef("Tx Antenna Gain:\t%d\r\n", _dot->getAntennaGain()); _serial.writef("Tx Wait:\t\t%s\r\n", _dot->getTxWait() ? "on" : "off"); _serial.writef("Tx Inverted Signal:\t%s\r\n", _dot->getTxInverted() ? "on" : "off"); - _serial.writef("Rx Frequency:\t\t%lu\r\n", _dot->getRxFrequency()); - _serial.writef("Rx Data Rate:\t\t%s\r\n", mDot::DataRateStr(_dot->getRxDataRate()).c_str()); + bool hasChannels = false; + for (size_t i = 0; i < 16; i++) { + if (_dot->getConfigChannels()[i] != 0) { + hasChannels = true; + break; + } + } + + if (hasChannels) { + _serial.writef("Tx Channels --------------------------------------\r\n"); + _serial.writef("\tIndex\tFrequency\tDR Range\r\n"); + for (size_t i = 0; i < 16; i++) { + if (_dot->getConfigChannels()[i] != 0) + _serial.writef("\t%d:\t%09lu\t%02x\r\n", i, _dot->getConfigChannels()[i], _dot->getConfigChannelRanges()[i]); + } + _serial.writef("--------------------------------------------------\r\n"); + } + + _serial.writef("Rx Delay:\t\t%d s\r\n", _dot->getRxDelay()); +// _serial.writef("Rx Frequency:\t\t%lu\r\n", _dot->getRxFrequency()); +// _serial.writef("Rx Data Rate:\t\t%s\r\n", mDot::DataRateStr(_dot->getRxDataRate()).c_str()); _serial.writef("Rx Inverted Signal:\t%s\r\n", _dot->getRxInverted() ? "on" : "off"); _serial.writef("Rx Output Style:\t%s\r\n", mDot::RxOutputStr(_dot->getRxOutput()).c_str()); _serial.writef("Debug Baud Rate:\t%lu\r\n", _dot->getDebugBaud()); _serial.writef("Serial Baud Rate:\t%lu\r\n", _dot->getBaud()); + _serial.writef("Serial Flow Control:\t%s\r\n", _dot->getFlowControl() == 0 ? "off" : "on"); + _serial.writef("Serial Clear On Error:\t%s\r\n", _dot->getSerialClearOnError() == 0 ? "off" : "on"); - _serial.writef("Wake Mode:\t\t%s\r\n", _dot->getWakeMode() == 0 ? "INTERVAL" : "INTERRUPT"); + uint8_t mode = _dot->getWakeMode(); + _serial.writef("Wake Mode:\t\t%s\r\n", mode == 0 ? "INTERVAL" : ( mode == 1 ? "INTERRUPT" : "BOTH")); _serial.writef("Wake Interval:\t\t%lu s\r\n", _dot->getWakeInterval()); _serial.writef("Wake Delay:\t\t%lu ms\r\n", _dot->getWakeDelay()); _serial.writef("Wake Timeout:\t\t%u ms\r\n", _dot->getWakeTimeout()); - - //_serial.writef("Wake Pin:\t\t%s\r\n", mDot::pinName2Str(_dot->getWakePin()).c_str()); + _serial.writef("Wake Pin:\t\t%s\r\n", mDot::pinName2Str(_dot->getWakePin()).c_str()); _serial.writef("Log Level:\t\t%ld\r\n", _dot->getLogLevel());