We have 2
computers on the
boat, one whit a USB-GPS and gpsd, that both
computers connects to.
The localhost connection works fine, but the other computer says "
no gps device" in debug output, whitout reson.
more detaljed, its the row: "
if (m_gps_data->devices.list[0].activated < 1.0)" that disable the
gps, if i ignore that, then it works fine, anyone got an ide how to dig deeper in this?
Made a workaround patch, to be able to use
opencpn until the problem is
solved:
Code:
diff --git a/src/chart1.cpp b/src/chart1.cpp
index f8aba47..1b1ab9e 100644
--- a/src/chart1.cpp
+++ b/src/chart1.cpp
@@ -391,6 +391,7 @@ bool g_bAISRolloverShowCOG;
bool g_bAISRolloverShowCPA;
bool g_bDebugGPSD;
+bool g_bForceGPSDActive;
bool g_bFullScreenQuilt;
bool g_bQuiltEnable;
diff --git a/src/navutil.cpp b/src/navutil.cpp
index 1f04c7a..2b954bc 100644
--- a/src/navutil.cpp
+++ b/src/navutil.cpp
@@ -248,6 +248,7 @@ extern bool g_bAISRolloverShowCPA;
extern bool g_blocale_changed;
extern bool g_bDebugGPSD;
+extern bool g_bForceGPSDActive;
extern bool g_bfilter_cogsog;
extern int g_COGFilterSec;
@@ -2674,6 +2675,7 @@ int MyConfig::LoadMyConfig ( int iteration )
Read ( _T ( "DebugS57" ), &g_bDebugS57, 0 ); // Show LUP and Feature info in object query
Read ( _T ( "DebugBSBImg" ), &g_BSBImgDebug, 0 );
Read ( _T ( "DebugGPSD" ), &g_bDebugGPSD, 0 );
+ Read ( _T ( "ForceGPSDActive" ), &g_bForceGPSDActive, 0 );
Read ( _T ( "UseGreenShipIcon" ), &g_bUseGreenShip, 0 );
Read ( _T ( "AllowExtremeOverzoom" ), &g_b_overzoom_x, 1 );
diff --git a/src/nmea.cpp b/src/nmea.cpp
index 8f1bcf8..5657d29 100644
--- a/src/nmea.cpp
+++ b/src/nmea.cpp
@@ -81,6 +81,7 @@ int s_dns_test_flag;
static GenericPosDat ThreadPositionData;
extern bool g_bDebugGPSD;
+extern bool g_bForceGPSDActive;
extern MyFrame *gFrame;
//------------------------------------------------------------------------------
@@ -788,6 +789,7 @@ void NMEAHandler::OnTimerLIBGPS(wxTimerEvent& event)
if(!m_bgps_present)
{
if(g_bDebugGPSD)printf(" no gps device\n");
+ if(g_bForceGPSDActive) m_bgps_present = true;
}
else
{
That make it possible to bypass this problem by adding
ForceGPSDActive=1 under
[Settings] in the config-file