Elmo Terminal provides functionality to test Lora radio and access SX1272 chip registers delivered with Elmo board. This firmware allows the user to control the LoRa radio parameters (eg. frequency, bandwidth, spreading factor etc.) by entering console commands via serial terminal. Application also contains "Ping-Pong" and data transmission functionalities.
Fork of Elmo-Terminal by
Diff: RadioContex.cpp
- Revision:
- 6:453b018a9ba0
- Parent:
- 4:2767f13b0a75
- Child:
- 10:e4cbc7292f40
--- 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());