few changes for RTS/CTS control
Dependencies: MTS-Serial libmDot mbed-rtos mbed
Fork of mDot_AT_firmware by
Diff: CommandTerminal/CmdSendBinary.cpp
- Revision:
- 11:77b7911263da
- Parent:
- 9:ff62b20f7000
--- a/CommandTerminal/CmdSendBinary.cpp Mon Apr 04 16:37:01 2016 +0000 +++ b/CommandTerminal/CmdSendBinary.cpp Tue Oct 25 05:39:39 2016 +0000 @@ -36,8 +36,17 @@ if (_dot->getTxWait() && _dot->recv(data) == mDot::MDOT_OK) { if (!data.empty()) { if (_dot->getVerbose()) - _serial.writef("Packet data:\r\n"); - _serial.writef("%s\r\n", CommandTerminal::formatPacketData(data, _dot->getRxOutput()).c_str()); + _serial.writef("Packet data:\r\n"); + + if (_dot->getRxOutput() == mDot::HEXADECIMAL) { + for (size_t i = 0; i < data.size(); i++) { + _serial.writef("%02x", data[i]); + } + _serial.writef("\r\n"); + } else { + _serial.writef("%s\r\n", CommandTerminal::formatPacketData(data, _dot->getRxOutput()).c_str()); + } + } }