mirror of
https://github.com/g4klx/ircDDBGateway.git
synced 2026-01-08 09:19:59 +01:00
Fix compile issues.
This commit is contained in:
parent
70840a10c2
commit
dd4549a753
|
|
@ -290,10 +290,10 @@ void CAPRSWriter::clock(unsigned int ms)
|
|||
m_idTimer.start();
|
||||
}
|
||||
|
||||
sendIdFrameMobile();
|
||||
sendIdFramesMobile();
|
||||
} else {
|
||||
if (m_idTimer.hasExpired()) {
|
||||
sendIdFrameFixed();
|
||||
sendIdFramesFixed();
|
||||
m_idTimer.start();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,9 +73,9 @@ public:
|
|||
|
||||
bool open();
|
||||
|
||||
void setFixedPort(const wxString& callsign, const wxString& band, double frequency, double offset, double range, double latitude, double longitude, double agl);
|
||||
void setPortFixed(const wxString& callsign, const wxString& band, double frequency, double offset, double range, double latitude, double longitude, double agl);
|
||||
|
||||
void setMobilePort(const wxString& callsign, const wxString& band, double frequency, double offset, double range, const wxString& address, unsigned int port);
|
||||
void setPortMobile(const wxString& callsign, const wxString& band, double frequency, double offset, double range, const wxString& address, unsigned int port);
|
||||
|
||||
void writeHeader(const wxString& callsign, const CHeaderData& header);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2006-2014 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2006-2014,2018 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* 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
|
||||
|
|
@ -37,6 +37,34 @@ m_fd(-1)
|
|||
#endif
|
||||
}
|
||||
|
||||
CUDPReaderWriter::CUDPReaderWriter(unsigned int port) :
|
||||
m_address(),
|
||||
m_port(port),
|
||||
m_addr(),
|
||||
m_fd(-1)
|
||||
{
|
||||
#if defined(__WINDOWS__)
|
||||
WSAData data;
|
||||
int wsaRet = ::WSAStartup(MAKEWORD(2, 2), &data);
|
||||
if (wsaRet != 0)
|
||||
wxLogError(wxT("Error from WSAStartup"));
|
||||
#endif
|
||||
}
|
||||
|
||||
CUDPReaderWriter::CUDPReaderWriter() :
|
||||
m_address(),
|
||||
m_port(0U),
|
||||
m_addr(),
|
||||
m_fd(-1)
|
||||
{
|
||||
#if defined(__WINDOWS__)
|
||||
WSAData data;
|
||||
int wsaRet = ::WSAStartup(MAKEWORD(2, 2), &data);
|
||||
if (wsaRet != 0)
|
||||
wxLogError(wxT("Error from WSAStartup"));
|
||||
#endif
|
||||
}
|
||||
|
||||
CUDPReaderWriter::~CUDPReaderWriter()
|
||||
{
|
||||
#if defined(__WINDOWS__)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2009-2011,2013 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2009-2011,2013,2018 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* 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
|
||||
|
|
@ -35,6 +35,8 @@
|
|||
class CUDPReaderWriter {
|
||||
public:
|
||||
CUDPReaderWriter(const wxString& address, unsigned int port);
|
||||
CUDPReaderWriter(unsigned int port);
|
||||
CUDPReaderWriter();
|
||||
~CUDPReaderWriter();
|
||||
|
||||
static in_addr lookup(const wxString& hostName);
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ void CIRCDDBGatewayApp::createThread()
|
|||
wxString mobileGPSAddress;
|
||||
unsigned int mobileGPSPort;
|
||||
m_config->getMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort);
|
||||
wxLogInfo(wxT("Mobile GPS: %d, address: %s, port: %u"), int(mobileGPSEnabled), mobileGPSAddress.c_str(), m_mobileGPSPort);
|
||||
wxLogInfo(wxT("Mobile GPS: %d, address: %s, port: %u"), int(mobileGPSEnabled), mobileGPSAddress.c_str(), mobileGPSPort);
|
||||
|
||||
CIcomRepeaterProtocolHandler* icomRepeaterHandler = NULL;
|
||||
CHBRepeaterProtocolHandler* hbRepeaterHandler = NULL;
|
||||
|
|
@ -359,7 +359,7 @@ void CIRCDDBGatewayApp::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1);
|
||||
}
|
||||
|
|
@ -370,7 +370,7 @@ void CIRCDDBGatewayApp::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1);
|
||||
}
|
||||
|
|
@ -455,7 +455,7 @@ void CIRCDDBGatewayApp::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2);
|
||||
}
|
||||
|
|
@ -466,7 +466,7 @@ void CIRCDDBGatewayApp::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2);
|
||||
}
|
||||
|
|
@ -555,7 +555,7 @@ void CIRCDDBGatewayApp::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3);
|
||||
}
|
||||
|
|
@ -566,7 +566,7 @@ void CIRCDDBGatewayApp::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3);
|
||||
}
|
||||
|
|
@ -659,7 +659,7 @@ void CIRCDDBGatewayApp::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4);
|
||||
}
|
||||
|
|
@ -670,7 +670,7 @@ void CIRCDDBGatewayApp::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ bool CIRCDDBGatewayAppD::createThread()
|
|||
wxString mobileGPSAddress;
|
||||
unsigned int mobileGPSPort;
|
||||
config.getMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort);
|
||||
wxLogInfo(wxT("Mobile GPS: %d, address: %s, port: %u"), int(mobileGPSEnabled), mobileGPSAddress.c_str(), m_mobileGPSPort);
|
||||
wxLogInfo(wxT("Mobile GPS: %d, address: %s, port: %u"), int(mobileGPSEnabled), mobileGPSAddress.c_str(), mobileGPSPort);
|
||||
|
||||
CIcomRepeaterProtocolHandler* icomRepeaterHandler = NULL;
|
||||
CHBRepeaterProtocolHandler* hbRepeaterHandler = NULL;
|
||||
|
|
@ -348,7 +348,7 @@ bool CIRCDDBGatewayAppD::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1);
|
||||
}
|
||||
|
|
@ -359,7 +359,7 @@ bool CIRCDDBGatewayAppD::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1);
|
||||
}
|
||||
|
|
@ -444,7 +444,7 @@ bool CIRCDDBGatewayAppD::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2);
|
||||
}
|
||||
|
|
@ -455,7 +455,7 @@ bool CIRCDDBGatewayAppD::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl1);
|
||||
}
|
||||
|
|
@ -544,7 +544,7 @@ bool CIRCDDBGatewayAppD::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3);
|
||||
}
|
||||
|
|
@ -555,7 +555,7 @@ bool CIRCDDBGatewayAppD::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3);
|
||||
}
|
||||
|
|
@ -648,7 +648,7 @@ bool CIRCDDBGatewayAppD::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4);
|
||||
}
|
||||
|
|
@ -659,7 +659,7 @@ bool CIRCDDBGatewayAppD::createThread()
|
|||
|
||||
if (aprs != NULL) {
|
||||
if (mobileGPSEnabled)
|
||||
aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, m_mobileGPSAddress, m_mobileGPSPort);
|
||||
aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, mobileGPSAddress, mobileGPSPort);
|
||||
else
|
||||
aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue