Skip to content

Commit

Permalink
Move POCSAG to match the other modes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Naylor committed Jan 10, 2019
1 parent a5813dc commit e52d0e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 7 additions & 8 deletions MMDVMHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "Version.h"
#include "StopWatch.h"
#include "Defines.h"
#include "POCSAGControl.h"
#include "Thread.h"
#include "Log.h"
#include "GitVersion.h"
Expand Down Expand Up @@ -119,6 +118,7 @@ m_dmr(NULL),
m_ysf(NULL),
m_p25(NULL),
m_nxdn(NULL),
m_pocsag(NULL),
m_dstarNetwork(NULL),
m_dmrNetwork(NULL),
m_ysfNetwork(NULL),
Expand Down Expand Up @@ -566,14 +566,13 @@ int CMMDVMHost::run()

CTimer pocsagTimer(1000U, 30U);

CPOCSAGControl* pocsag = NULL;
if (m_pocsagEnabled) {
unsigned int frequency = m_conf.getPOCSAGFrequency();

LogInfo("POCSAG RF Parameters");
LogInfo(" Frequency: %uHz", frequency);

pocsag = new CPOCSAGControl(m_pocsagNetwork, m_display);
m_pocsag = new CPOCSAGControl(m_pocsagNetwork, m_display);

pocsagTimer.start();
}
Expand Down Expand Up @@ -893,10 +892,10 @@ int CMMDVMHost::run()
}
}

if (pocsag != NULL) {
if (m_pocsag != NULL) {
ret = m_modem->hasPOCSAGSpace();
if (ret) {
len = pocsag->readModem(data);
len = m_pocsag->readModem(data);
if (len > 0U) {
if (m_mode == MODE_IDLE) {
m_modeTimer.setTimeout(m_pocsagNetModeHang);
Expand Down Expand Up @@ -940,8 +939,8 @@ int CMMDVMHost::run()
m_p25->clock(ms);
if (m_nxdn != NULL)
m_nxdn->clock(ms);
if (pocsag != NULL)
pocsag->clock(ms);
if (m_pocsag != NULL)
m_pocsag->clock(ms);

if (m_dstarNetwork != NULL)
m_dstarNetwork->clock(ms);
Expand Down Expand Up @@ -1075,7 +1074,7 @@ int CMMDVMHost::run()
delete m_ysf;
delete m_p25;
delete m_nxdn;
delete pocsag;
delete m_pocsag;

return 0;
}
Expand Down
2 changes: 2 additions & 0 deletions MMDVMHost.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include "RemoteControl.h"
#include "POCSAGNetwork.h"
#include "POCSAGControl.h"
#include "DStarNetwork.h"
#include "NXDNNetwork.h"
#include "DStarControl.h"
Expand Down Expand Up @@ -60,6 +61,7 @@ class CMMDVMHost
CYSFControl* m_ysf;
CP25Control* m_p25;
CNXDNControl* m_nxdn;
CPOCSAGControl* m_pocsag;
CDStarNetwork* m_dstarNetwork;
CDMRNetwork* m_dmrNetwork;
CYSFNetwork* m_ysfNetwork;
Expand Down

0 comments on commit e52d0e6

Please sign in to comment.