1
0
Fork 0

Fixed startup bug.

ycs232-kbc
Jonathan Naylor 5 years ago
parent 6f4a283526
commit 83d8e290cc

@ -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)

@ -19,6 +19,6 @@
#if !defined(VERSION_H) #if !defined(VERSION_H)
#define VERSION_H #define VERSION_H
const char* VERSION = "20200603"; const char* VERSION = "20200604";
#endif #endif

Loading…
Cancel
Save