Elmo Terminal provides functionality to test Lora radio and access SX1272 chip registers delivered with Elmo board. Also contains example ping-pong application.
Dependencies: SX1272lib mbed-src
Diff: RadioContex.cpp
- Revision:
- 6:453b018a9ba0
- Parent:
- 4:2767f13b0a75
diff -r f47aa82f7a96 -r 453b018a9ba0 RadioContex.cpp --- a/RadioContex.cpp Thu Oct 01 12:52:17 2015 +0000 +++ b/RadioContex.cpp Thu Oct 01 13:13:08 2015 +0000 @@ -3,7 +3,6 @@ #include "RadioContex.h" #include "Settings.h" #include "dbg.h" -#include <sstream> /* Set this flag to '1' to display debug messages on the console */ @@ -121,12 +120,13 @@ return true; } +extern std::string to_string(const int32_t val); bool RadioContex::Send(std::string arg) { - stringstream ss; - ss <<" "<< sendCntr; - arg.append(ss.str()); + std::string ss(" "); + ss.append(to_string(sendCntr)); + arg.append(ss); const uint8_t* msg = (const unsigned char *)(arg.c_str()); uint16_t msgSize = static_cast<uint16_t>(arg.size());