|
|
|
@ -41,7 +41,7 @@ m_aprsSocket()
|
|
|
|
|
#if !defined(_WIN32) && !defined(_WIN64)
|
|
|
|
|
,m_gpsdEnabled(false),
|
|
|
|
|
m_gpsdAddress(),
|
|
|
|
|
m_gpsdPort(0U),
|
|
|
|
|
m_gpsdPort(),
|
|
|
|
|
m_gpsdData()
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
@ -99,6 +99,8 @@ bool CAPRSWriter::open()
|
|
|
|
|
|
|
|
|
|
::gps_stream(&m_gpsdData, WATCH_ENABLE | WATCH_JSON, NULL);
|
|
|
|
|
|
|
|
|
|
LogMessage("Connected to GPSD");
|
|
|
|
|
|
|
|
|
|
// Poll the GPS every minute
|
|
|
|
|
m_idTimer.setTimeout(60U);
|
|
|
|
|
} else {
|
|
|
|
@ -109,7 +111,13 @@ bool CAPRSWriter::open()
|
|
|
|
|
#endif
|
|
|
|
|
m_idTimer.start();
|
|
|
|
|
|
|
|
|
|
return m_aprsSocket.open();
|
|
|
|
|
bool ret = m_aprsSocket.open();
|
|
|
|
|
if (!ret)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
LogMessage("Opened connection to the APRS Gateway");
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CAPRSWriter::write(const unsigned char* source, const char* type, unsigned char radio, float fLatitude, float fLongitude)
|
|
|
|
|