Finish Wires-X upper case for YSF2DMR

This commit is contained in:
Andy CA6JAU 2019-01-27 00:31:39 -03:00
parent 05e4193349
commit faf78a842f
3 changed files with 15 additions and 7 deletions

View File

@ -1,7 +1,7 @@
/*
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
* Copyright (C) 2018 by Manuel Sanchez EA7EE
* Copyright (C) 2018 by Andy Uribe CA6JAU
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -49,7 +49,7 @@ const unsigned char DEFAULT_FICH[] = {0x20U, 0x00U, 0x01U, 0x00U};
const unsigned char NET_HEADER[] = "YSFD ALL ";
CWiresX::CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, std::string tgfile) :
CWiresX::CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, std::string tgfile, bool makeUpper) :
m_callsign(callsign),
m_node(),
m_id(),
@ -68,7 +68,8 @@ m_csd3(NULL),
m_status(WXSI_NONE),
m_start(0U),
m_search(),
m_category()
m_category(),
m_makeUpper(makeUpper)
{
assert(network != NULL);
@ -115,6 +116,11 @@ m_category()
tgreg->m_name = std::string(p3);
tgreg->m_desc = std::string(p4);
if (m_makeUpper) {
std::transform(tgreg->m_name.begin(), tgreg->m_name.end(), tgreg->m_name.begin(), ::toupper);
std::transform(tgreg->m_desc.begin(), tgreg->m_desc.end(), tgreg->m_desc.begin(), ::toupper);
}
tgreg->m_name.resize(16U, ' ');
tgreg->m_desc.resize(14U, ' ');

View File

@ -1,7 +1,7 @@
/*
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
* Copyright (C) 2018 by Manuel Sanchez EA7EE
* Copyright (C) 2018 by Andy Uribe CA6JAU
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -66,7 +66,7 @@ public:
class CWiresX {
public:
CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, std::string tgfile);
CWiresX(const std::string& callsign, const std::string& suffix, CYSFNetwork* network, std::string tgfile, bool makeUpper);
~CWiresX();
bool start();
@ -110,6 +110,7 @@ private:
std::vector<CTGReg*> m_currTGList;
std::vector<CTGReg*> m_TGSearch;
std::vector<CTGReg*> m_category;
bool m_makeUpper;
WX_STATUS processConnect(const unsigned char* source, const unsigned char* data);
void processDX(const unsigned char* source);

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
* Copyright (C) 2018 by Andy Uribe CA6JAU
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
* Copyright (C) 2018 by Manuel Sanchez EA7EE
*
* This program is free software; you can redistribute it and/or modify
@ -304,7 +304,8 @@ int CYSF2DMR::run()
// CWiresX Control Object
if (m_enableWiresX) {
m_wiresX = new CWiresX(m_callsign, m_suffix, m_ysfNetwork, m_TGList);
bool makeUpper = m_conf.getWiresXMakeUpper();
m_wiresX = new CWiresX(m_callsign, m_suffix, m_ysfNetwork, m_TGList, makeUpper);
m_dtmf = new CDTMF;
}