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