Skip to content

Commit

Permalink
jb: cleanup
Browse files Browse the repository at this point in the history
jb was removed in 2808c70
  • Loading branch information
stefansaraev committed Nov 8, 2020
1 parent 68e320a commit da44020
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 22 deletions.
8 changes: 0 additions & 8 deletions Conf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ m_dmrNetworkPort(0U),
m_dmrNetworkPassword(),
m_dmrNetworkOptions(),
m_dmrNetworkDebug(false),
m_dmrNetworkJitter(360U),
m_dmrNetworkSlot1(true),
m_dmrNetworkSlot2(true),
m_dmrNetworkModeHang(3U),
Expand Down Expand Up @@ -440,8 +439,6 @@ bool CConf::read()
m_dmrNetworkOptions = value;
else if (::strcmp(key, "Debug") == 0)
m_dmrNetworkDebug = ::atoi(value) == 1;
else if (::strcmp(key, "Jitter") == 0)
m_dmrNetworkJitter = (unsigned int)::atoi(value);
else if (::strcmp(key, "Slot1") == 0)
m_dmrNetworkSlot1 = ::atoi(value) == 1;
else if (::strcmp(key, "Slot2") == 0)
Expand Down Expand Up @@ -871,11 +868,6 @@ bool CConf::getDMRNetworkDebug() const
return m_dmrNetworkDebug;
}

unsigned int CConf::getDMRNetworkJitter() const
{
return m_dmrNetworkJitter;
}

bool CConf::getDMRNetworkSlot1() const
{
return m_dmrNetworkSlot1;
Expand Down
2 changes: 0 additions & 2 deletions Conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ class CConf
std::string getDMRNetworkPassword() const;
std::string getDMRNetworkOptions() const;
bool getDMRNetworkDebug() const;
unsigned int getDMRNetworkJitter() const;
bool getDMRNetworkSlot1() const;
bool getDMRNetworkSlot2() const;
unsigned int getDMRNetworkModeHang() const;
Expand Down Expand Up @@ -237,7 +236,6 @@ class CConf
std::string m_dmrNetworkPassword;
std::string m_dmrNetworkOptions;
bool m_dmrNetworkDebug;
unsigned int m_dmrNetworkJitter;
bool m_dmrNetworkSlot1;
bool m_dmrNetworkSlot2;
unsigned int m_dmrNetworkModeHang;
Expand Down
4 changes: 2 additions & 2 deletions DMRControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <cassert>
#include <algorithm>

CDMRControl::CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, bool embeddedLCOnly, bool dumpTAData, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blacklist, const std::vector<unsigned int>& whitelist, const std::vector<unsigned int>& slot1TGWhitelist, const std::vector<unsigned int>& slot2TGWhitelist, unsigned int timeout, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CRSSIInterpolator* rssi, unsigned int jitter, DMR_OVCM_TYPES ovcm) :
CDMRControl::CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, bool embeddedLCOnly, bool dumpTAData, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blacklist, const std::vector<unsigned int>& whitelist, const std::vector<unsigned int>& slot1TGWhitelist, const std::vector<unsigned int>& slot2TGWhitelist, unsigned int timeout, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CRSSIInterpolator* rssi, DMR_OVCM_TYPES ovcm) :
m_colorCode(colorCode),
m_modem(modem),
m_network(network),
Expand All @@ -36,7 +36,7 @@ m_slot2(2U, timeout)
// Load black and white lists to DMRAccessControl
CDMRAccessControl::init(blacklist, whitelist, slot1TGWhitelist, slot2TGWhitelist, selfOnly, prefixes, id);

CDMRSlot::init(colorCode, embeddedLCOnly, dumpTAData, callHang, modem, network, display, duplex, rssi, jitter, ovcm);
CDMRSlot::init(colorCode, embeddedLCOnly, dumpTAData, callHang, modem, network, display, duplex, rssi, ovcm);
}

CDMRControl::~CDMRControl()
Expand Down
2 changes: 1 addition & 1 deletion DMRControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

class CDMRControl {
public:
CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, bool embeddedLCOnly, bool dumpTAData, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blacklist, const std::vector<unsigned int>& whitelist, const std::vector<unsigned int>& slot1TGWhitelist, const std::vector<unsigned int>& slot2TGWhitelist, unsigned int timeout, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CRSSIInterpolator* rssi, unsigned int jitter, DMR_OVCM_TYPES ovcm);
CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, bool embeddedLCOnly, bool dumpTAData, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blacklist, const std::vector<unsigned int>& whitelist, const std::vector<unsigned int>& slot1TGWhitelist, const std::vector<unsigned int>& slot2TGWhitelist, unsigned int timeout, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CRSSIInterpolator* rssi, DMR_OVCM_TYPES ovcm);
~CDMRControl();

bool processWakeup(const unsigned char* data);
Expand Down
3 changes: 1 addition & 2 deletions DMRSlot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ m_netN(0U),
m_networkWatchdog(1000U, 0U, 1500U),
m_rfTimeoutTimer(1000U, timeout),
m_netTimeoutTimer(1000U, timeout),
m_packetTimer(1000U, 0U, 50U),
m_interval(),
m_elapsed(),
m_rfFrames(0U),
Expand Down Expand Up @@ -1856,7 +1855,7 @@ void CDMRSlot::writeQueueNet(const unsigned char *data)
m_queue.addData(data, len);
}

void CDMRSlot::init(unsigned int colorCode, bool embeddedLCOnly, bool dumpTAData, unsigned int callHang, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CRSSIInterpolator* rssiMapper, unsigned int jitter, DMR_OVCM_TYPES ovcm)
void CDMRSlot::init(unsigned int colorCode, bool embeddedLCOnly, bool dumpTAData, unsigned int callHang, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CRSSIInterpolator* rssiMapper, DMR_OVCM_TYPES ovcm)
{
assert(modem != NULL);
assert(display != NULL);
Expand Down
3 changes: 1 addition & 2 deletions DMRSlot.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class CDMRSlot {

void enable(bool enabled);

static void init(unsigned int colorCode, bool embeddedLCOnly, bool dumpTAData, unsigned int callHang, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CRSSIInterpolator* rssiMapper, unsigned int jitter, DMR_OVCM_TYPES ovcm);
static void init(unsigned int colorCode, bool embeddedLCOnly, bool dumpTAData, unsigned int callHang, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CRSSIInterpolator* rssiMapper, DMR_OVCM_TYPES ovcm);

private:
unsigned int m_slotNo;
Expand All @@ -88,7 +88,6 @@ class CDMRSlot {
CTimer m_networkWatchdog;
CTimer m_rfTimeoutTimer;
CTimer m_netTimeoutTimer;
CTimer m_packetTimer;
CStopWatch m_interval;
CStopWatch m_elapsed;
unsigned int m_rfFrames;
Expand Down
1 change: 0 additions & 1 deletion MMDVM.ini
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ Frequency=439987500
Enable=1
Address=192.168.12.34
Port=62031
Jitter=360
Password=PASSWORD
# Options=
Slot1=1
Expand Down
5 changes: 1 addition & 4 deletions MMDVMHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ int CMMDVMHost::run()
std::vector<unsigned int> slot2TGWhiteList = m_conf.getDMRSlot2TGWhiteList();
unsigned int callHang = m_conf.getDMRCallHang();
unsigned int txHang = m_conf.getDMRTXHang();
unsigned int jitter = m_conf.getDMRNetworkJitter();
m_dmrRFModeHang = m_conf.getDMRModeHang();
dmrBeacons = m_conf.getDMRBeacons();
DMR_OVCM_TYPES ovcm = m_conf.getDMROVCM();
Expand Down Expand Up @@ -318,7 +317,7 @@ int CMMDVMHost::run()
break;
}

m_dmr = new CDMRControl(id, colorCode, callHang, selfOnly, embeddedLCOnly, dumpTAData, prefixes, blackList, whiteList, slot1TGWhiteList, slot2TGWhiteList, m_timeout, m_modem, m_dmrNetwork, m_display, m_duplex, rssi, jitter, ovcm);
m_dmr = new CDMRControl(id, colorCode, callHang, selfOnly, embeddedLCOnly, dumpTAData, prefixes, blackList, whiteList, slot1TGWhiteList, slot2TGWhiteList, m_timeout, m_modem, m_dmrNetwork, m_display, m_duplex, rssi, ovcm);

m_dmrTXTimer.setTimeout(txHang);
}
Expand Down Expand Up @@ -708,7 +707,6 @@ bool CMMDVMHost::createDMRNetwork()
unsigned int id = m_conf.getDMRId();
std::string password = m_conf.getDMRNetworkPassword();
bool debug = m_conf.getDMRNetworkDebug();
unsigned int jitter = m_conf.getDMRNetworkJitter();
bool slot1 = m_conf.getDMRNetworkSlot1();
bool slot2 = m_conf.getDMRNetworkSlot2();
HW_TYPE hwType = m_modem->getHWType();
Expand All @@ -717,7 +715,6 @@ bool CMMDVMHost::createDMRNetwork()
LogInfo("DMR Network Parameters");
LogInfo(" Address: %s", address.c_str());
LogInfo(" Port: %u", port);
LogInfo(" Jitter: %ums", jitter);
LogInfo(" Slot 1: %s", slot1 ? "enabled" : "disabled");
LogInfo(" Slot 2: %s", slot2 ? "enabled" : "disabled");
LogInfo(" Mode Hang: %us", m_dmrNetModeHang);
Expand Down

0 comments on commit da44020

Please sign in to comment.