Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MTS-Serial libxDot-mbed5
Diff: CommandTerminal/CommandTerminal.cpp
- Revision:
- 2:e5eebd74d36d
- Parent:
- 1:e52ae6584f1c
- Child:
- 4:666017851052
--- a/CommandTerminal/CommandTerminal.cpp Thu Jun 25 10:23:41 2015 -0500 +++ b/CommandTerminal/CommandTerminal.cpp Fri Jul 10 09:43:56 2015 -0500 @@ -558,14 +558,10 @@ } std::string CommandTerminal::formatPacketData(const std::vector<uint8_t>& data, const uint8_t& format) { - if (format == mDot::HEXADECIMAL) { + if (format == mDot::HEXADECIMAL) return mts::Text::bin2hexString(data); - } else { - std::string data_str; - for (int i = 0; i < data.size(); i++) - data_str.append((const char*)data[i], 1); - return data_str; - } + else + return std::string(data.begin(), data.end()); } void CommandTerminal::sleep(bool standby) {