From d07868286beedfc941ca0dd864ba686fa4d6fdfe Mon Sep 17 00:00:00 2001 From: Adi Bier / DL1HRC Date: Wed, 26 Oct 2022 10:01:58 +0200 Subject: [PATCH 1/2] Link to English doc (by F1IWQ) updated --- README-Tetra | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-Tetra b/README-Tetra index f2682dca..8d1a344f 100644 --- a/README-Tetra +++ b/README-Tetra @@ -12,7 +12,7 @@ This branch only works if you have the following things: The MS is completely controlled by AT-commands over the PEI interface Installation instructions from Frédéric/F1IWQ can be found here: -https://raw.githubusercontent.com/f1iwq2/Tetra_Link_boardIWQ/main/Doc/Download%20svxlink-tetra.pdf +https://github.com/f1iwq2/Tetra_Link_boardIWQ/blob/main/Doc/Download%20svxlink-tetra.pdf Here are two quick-and-dirty installation/update documentation, keep in mind: No configuration will be done! From 58e476d8dc7d33f295f4c2232a422338b3f8c068 Mon Sep 17 00:00:00 2001 From: Adi Bier / DL1HRC Date: Wed, 26 Oct 2022 10:30:27 +0200 Subject: [PATCH 2/2] Replaced obsolete Json::Fastwriter methods from Reflector and Tetra classes --- src/svxlink/reflector/Reflector.cpp | 7 +++++-- src/svxlink/svxlink/ReflectorLogic.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/svxlink/reflector/Reflector.cpp b/src/svxlink/reflector/Reflector.cpp index c0671623..5316bd34 100644 --- a/src/svxlink/reflector/Reflector.cpp +++ b/src/svxlink/reflector/Reflector.cpp @@ -966,8 +966,11 @@ void Reflector::writeUserData(std::map userdata) string Reflector::jsonToString(Json::Value eventmessage) { - Json::FastWriter jsontoString; - std::string message = jsontoString.write(eventmessage); + Json::StreamWriterBuilder builder; + std::unique_ptr writer(builder.newStreamWriter()); + std::ostringstream ostream; + writer->write(eventmessage, &ostream); + std::string message = ostream.str(); message.erase(std::remove_if(message.begin(), message.end(), [](unsigned char x){return std::iscntrl(x);})); return message; diff --git a/src/svxlink/svxlink/ReflectorLogic.cpp b/src/svxlink/svxlink/ReflectorLogic.cpp index 66df5059..49b05e94 100644 --- a/src/svxlink/svxlink/ReflectorLogic.cpp +++ b/src/svxlink/svxlink/ReflectorLogic.cpp @@ -1867,8 +1867,11 @@ void ReflectorLogic::handlePlayDtmf(const std::string& digit, int amp, string ReflectorLogic::jsonToString(Json::Value eventmessage) { - Json::FastWriter jsontoString; - std::string message = jsontoString.write(eventmessage); + Json::StreamWriterBuilder builder; + std::unique_ptr writer(builder.newStreamWriter()); + std::ostringstream ostream; + writer->write(eventmessage, &ostream); + std::string message = ostream.str(); message.erase(std::remove_if(message.begin(), message.end(), [](unsigned char x){return std::iscntrl(x);})); return message;