Merged wir tetra-contrib

This commit is contained in:
Adi Bier / DL1HRC 2022-10-26 10:46:19 +02:00
commit f0a5587c1c
3 changed files with 47 additions and 4 deletions

37
README-Tetra Normal file
View File

@ -0,0 +1,37 @@
*
* Adi Bier / DL1HRC
* dl1hrc { at } gmx . de
*
This branch only works if you have the following things:
- Motorola MTM5x00, MTM800E, MTM800FuG
- active data cable, e.g. PMKN4104
- (Sepura/Cleartone my work, but no warranty)
The MS is completely controlled by AT-commands over the PEI interface
Installation instructions from Frédéric/F1IWQ can be found here:
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!
1) first time installation (including German(!) voice announcements):
You may use my semi-automatic installation-script from here
http://svxlink.ham-radio-op.net/svxlink/svxlink-tetra-contrib.sh
Start installation as root:
wget -O - http://svxlink.ham-radio-op.net/svxlink/svxlink-tetra-contrib.sh | bash
2) Update an existing tetra-contrib installation made by the previous script
as root:
systemctl stop svxlink
cd /home/svxlink/svxlink/src/build/
git pull
make install
systemctl start svxlink

View File

@ -966,8 +966,11 @@ void Reflector::writeUserData(std::map<std::string, User> userdata)
string Reflector::jsonToString(Json::Value eventmessage) string Reflector::jsonToString(Json::Value eventmessage)
{ {
Json::FastWriter jsontoString; Json::StreamWriterBuilder builder;
std::string message = jsontoString.write(eventmessage); std::unique_ptr<Json::StreamWriter> writer(builder.newStreamWriter());
std::ostringstream ostream;
writer->write(eventmessage, &ostream);
std::string message = ostream.str();
message.erase(std::remove_if(message.begin(), message.end(), message.erase(std::remove_if(message.begin(), message.end(),
[](unsigned char x){return std::iscntrl(x);})); [](unsigned char x){return std::iscntrl(x);}));
return message; return message;

View File

@ -1867,8 +1867,11 @@ void ReflectorLogic::handlePlayDtmf(const std::string& digit, int amp,
string ReflectorLogic::jsonToString(Json::Value eventmessage) string ReflectorLogic::jsonToString(Json::Value eventmessage)
{ {
Json::FastWriter jsontoString; Json::StreamWriterBuilder builder;
std::string message = jsontoString.write(eventmessage); std::unique_ptr<Json::StreamWriter> writer(builder.newStreamWriter());
std::ostringstream ostream;
writer->write(eventmessage, &ostream);
std::string message = ostream.str();
message.erase(std::remove_if(message.begin(), message.end(), message.erase(std::remove_if(message.begin(), message.end(),
[](unsigned char x){return std::iscntrl(x);})); [](unsigned char x){return std::iscntrl(x);}));
return message; return message;