Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 04-07-2014, 06:22   #1186
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Beta Test / Technical

Also I just made this page in Dev Manual.
Plugin Guidelines | Official OpenCPN Homepage
See item #3
rgleason is offline   Reply With Quote
Old 04-07-2014, 19:49   #1187
Registered User

Join Date: Jul 2014
Posts: 3
Re: Beta Test / Technical

Hello! Thanks for opencpn, it has been very useful over the years.

I've just installed the latest beta code for saucy on a machine running linux Mint 16 Cinnamon.

In the Connections section of Options in opencpn, the textbox for address when adding a new network gpsd connection does not seem to accept "localhost" as a valid entry (as suggested in the documentation). It does accept the localhost's IP number, but does not find the gps.

xgps finds the gpsd daemon correctly, as far as I can tell.

I'm using a lenovo T60p, with a 64-bit OS. I installed using the development ppa from the opencpn website. I'm using a BU-353 USB gps dongle.

This may be a bug, or I may be missing something (but I think I've been following the documentation quite closely).

Many thanks for your advice.

Danny
greentree is offline   Reply With Quote
Old 04-07-2014, 20:30   #1188
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,425
Re: Beta Test / Technical

Quote:
Originally Posted by greentree View Post
Hello!
... It does accept the localhost's IP number, but does not find the gps.
I have a very similar system, and the gps worked fine with gpsd, but the setting was set from an older version. In latest beta if I delete the connection then add it and hit apply, I get a message box complaining about the address.
seandepagnier is offline   Reply With Quote
Old 04-07-2014, 20:56   #1189
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,425
Re: Beta Test / Technical

See:
Code:
commit caf0e147d47689670376225fb85bf5d427b467f2
Author: Keith Young <stripydog7@gmail.com>
Date:   Wed May 28 07:39:19 2014 +0100

    Additional checks for empty port and address fields in datastream options

diff --git a/src/options.cpp b/src/options.cpp
index 3f01a28..d170c59 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -2518,11 +2518,17 @@ ConnectionParams *options::CreateConnectionParamsFromSelectedItem()
         wxMessageBox( _("You must select or enter the port..."), _("Error!") );
         return NULL;
     }
-    //  TCP (I/O), GPSD (Input) and UDP (Output) ports require address field to be set
-    else if ( m_rbTypeNet->GetValue() && m_tNetAddress->GetValue() == wxEmptyString ) {
-        if( m_rbNetProtoTCP->GetValue() ||
-            m_rbNetProtoGPSD->GetValue() ||
-            ( m_rbNetProtoUDP->GetValue() &&  m_cbOutput->GetValue()) )
+    //  TCP, GPSD and UDP require port field to be set.
+    //  TCP clients, GPSD and UDP output sockets require an address
+    else if ( m_rbTypeNet->GetValue()) {
+        if (wxAtoi(m_tNetPort->GetValue()) == 0)
+        {
+            wxMessageBox( _("You must enter a port..."), _("Error!") );
+            return NULL;
+        }
+        if (((m_rbNetProtoGPSD->GetValue()) ||
+                (m_rbNetProtoUDP->GetValue() && m_cbOutput->GetValue())) &&
+                wxStrpbrk(m_tNetAddress->GetValue(),_("123456789")) == NULL )
         {
             wxMessageBox( _("You must enter the address..."), _("Error!") );
             return NULL;
@@ -2542,7 +2548,6 @@ ConnectionParams *options::CreateConnectionParamsFromSelectedItem()
     pConnectionParams->LastNetworkPort = pConnectionParams->NetworkPort;
         
     pConnectionParams->NetworkAddress = m_tNetAddress->GetValue();
-    pConnectionParams->NetworkPort = wxAtoi(m_tNetPort->GetValue());
     if ( m_rbNetProtoTCP->GetValue() )
         pConnectionParams->NetProtocol = TCP;
     else if ( m_rbNetProtoUDP->GetValue() )
It is testing to ensure the address field has numbers in it, so "localhost1" is valid but "localhost" is not. Before testing was only to ensure the box was not empty.

I propose the following patch:

Code:
diff --git a/src/options.cpp b/src/options.cpp
index 9a599df..938f257 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -2523,12 +2523,14 @@ ConnectionParams *options::CreateConnectionParamsFromSelectedItem()
         if (m_rbNetProtoUDP->GetValue() && (!m_cbOutput->GetValue())) {
             m_tNetAddress->SetValue(_T("0.0.0.0"));
         }
-        else if (((m_rbNetProtoGPSD->GetValue()) ||
-                (m_rbNetProtoUDP->GetValue() && m_cbOutput->GetValue())) &&
-                wxStrpbrk(m_tNetAddress->GetValue(),_T("123456789")) == NULL )
+        else if ((m_rbNetProtoGPSD->GetValue()) ||
+                 (m_rbNetProtoUDP->GetValue() && m_cbOutput->GetValue()))
         {
-            wxMessageBox( _("You must enter the address..."), _("Error!") );
-            return NULL;
+            if(m_tNetAddress->GetValue().empty())
+                if(wxMessageBox( _("Address empty, assume local connection?"), _("Error!"),
+                                 wxYES_NO) == wxID_NO)
+                    return NULL;
+            m_tNetAddress->SetValue(_T("127.0.0.1"));
         }
 
         if (!m_tNetAddress->GetValue())
In testing this, I came across another bug. If you delete all the connections, then hit "ok" the options dialog remains, but cancel works and performs the operation ok would do (does not revert to old settings)
seandepagnier is offline   Reply With Quote
Old 04-07-2014, 21:03   #1190
Registered User

Join Date: Jul 2014
Posts: 3
Re: Beta Test / Technical

That's interesting. Can you tell from the settings file what the gps-related entries should be in the latest beta?
greentree is offline   Reply With Quote
Old 04-07-2014, 22:25   #1191
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: Beta Test / Technical

That is a known regression of 3.3.1824 - Afaik muttnik said he's going to fix it... Will definitely disappear in the next beta.

Pavel


Sent from
nohal is offline   Reply With Quote
Old 05-07-2014, 07:57   #1192
Registered User

Join Date: Oct 2012
Location: Brighton, UK
Boat: Westerly Oceanlord
Posts: 513
Re: Beta Test / Technical

Sorry yes: Only just seen this thread after having submitted a patch earlier today. This is the problem reported by redog last week.

Whilst patching this fixes rejecting of hostnames, it doesn't address the reported problem of gpsd input not working. I'm not near a gps unit to test this until next week, although tcpdump shows the initial connection being made OK at least. The changes I made for the last but one beta shouldn't have gone anywhere near the gpsd code but I will take a look when I have a gps to hook up to.

There's probably more than a few bugs lurking in the data connections code and related options code: I fixed a couple of crashes-waiting-to-happen doing the bi-directional stuff but I was mostly trying to make minimal changes.
muttnik is offline   Reply With Quote
Old 06-07-2014, 13:46   #1193
Registered User

Join Date: Jul 2014
Posts: 3
Re: Beta Test / Technical

Thanks all for your helpful replies.

From the 12.04 version, diff'ing opencpn.conf before and after the networked gps shows the significant change is

< DataConnections=
---
> DataConnections=1;2;localhost;2947;0;;4800;1;0;0;; 0;;0;0;0;0;1

As suggested by boat_alexandra, it looks as though hand editing DataConnections in opencpn.conf for the beta version enables it to find and get location data from the gps.

This seems like a relatively easy workaround for the short term.

best, Danny
greentree is offline   Reply With Quote
Old 11-07-2014, 10:34   #1194
Registered User

Join Date: Dec 2010
Location: oxnard, california
Boat: stich and glue, 19 ft wherry row/sail
Posts: 35
Re: Beta Test / Technical

I ran a git clone of opencpn today 11 jul 2014 version is 3.3.1220-1

I believe that I have all prerequisites for the build on fedora 20


after the cmake and while running make it errors out.


Scanning dependencies of target opencpn
[ 37%] Building CXX object CMakeFiles/opencpn.dir/src/chart1.cpp.o
/usr/local/src/OpenCPN/src/chart1.cpp: In member function ‘virtual bool MyApp::OnInit()’:
/usr/local/src/OpenCPN/src/chart1.cpp:1018:34: error: ‘wxHandleFatalExceptions’ was not declared in this scope
wxHandleFatalExceptions (true);
^
make[2]: *** [CMakeFiles/opencpn.dir/src/chart1.cpp.o] Error 1
make[1]: *** [CMakeFiles/opencpn.dir/all] Error 2
make: *** [all] Error 2


thanks
oystercatcher is offline   Reply With Quote
Old 11-07-2014, 10:48   #1195
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: Beta Test / Technical

oystercatcher...
The current tree is version 3.3.1824
The error you see is in a code commited pretty recently though. Start with cleaning your build directory and running "cmake .." again.

Pavel
nohal is offline   Reply With Quote
Old 11-07-2014, 11:25   #1196
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: Beta Test / Technical

Doing a quick search it looks like Fedora has shipped it's wxWidgets with several features disabled for some reason (https://bugzilla.redhat.com/show_bug.cgi?id=1076617).
This patch should work it around:
Code:
diff --git a/src/chart1.cpp b/src/chart1.cpp
index 0cc4c02..34184ed 100644
--- a/src/chart1.cpp
+++ b/src/chart1.cpp
@@ -1014,9 +1014,11 @@ bool MyApp::OnInit()
 #endif
 
 #ifdef LINUX_CRASHRPT
+#if wxUSE_ON_FATAL_EXCEPTION
     // fatal exceptions handling
     wxHandleFatalExceptions (true);
 #endif
+#endif
 
     //  Seed the random number generator
     wxDateTime x = wxDateTime::UNow();
Pavel
nohal is offline   Reply With Quote
Old 11-07-2014, 12:21   #1197
Registered User

Join Date: Dec 2010
Location: oxnard, california
Boat: stich and glue, 19 ft wherry row/sail
Posts: 35
Re: Beta Test / Technical

thanks pavel

applied the patch and opencpn 3.3.1824-1 compiled
oystercatcher is offline   Reply With Quote
Old 11-07-2014, 13:12   #1198
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: Beta Test / Technical

OK, thanks for the confirmation, I will commit it to the master in a while.

Pavel
nohal is offline   Reply With Quote
Old 14-07-2014, 03:54   #1199
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Beta Test / Technical

About Weatherfax and Opencpn wxWidgets support for tiff (Windows)?
Does the downloaded version of Opencpn 3.2.0, 3.2.2 and 3.3.1824 wxWidgets support tiff?
If tiff is not supported, do I provide wxWidgets 2.8.12 support for tiff by running
from the wxWidgets 2.8.12 build directory
cmake .. --with-libtiff
cmake --build .
cmake --build . --config release

Can I check file size changes to determine which dll's changed?
Or should I just take all of the dlls?

Can these dlls be installed by the NSIS installer automatically even if the directory is not under plugins?

We need support for TIF in Weatherfax plugin

----
PS Found no "tif in script directory files.
Found under bakefiles directory tif.bkl and jpeg.bkl and png.blk
rgleason is offline   Reply With Quote
Old 14-07-2014, 04:18   #1200
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Beta Test / Technical

RE: Tif support for Weatherfax Plugin
Found this
wxWidgets: wxImage Class Reference

Code:
Creates an image from a file. 
 Parameters        nameName of the file from which to load the image.      typeMay be one of the following: 
  • wxBITMAP_TYPE_BMP: Load a Windows bitmap file.
  • wxBITMAP_TYPE_GIF: Load a GIF bitmap file.
  • wxBITMAP_TYPE_JPEG: Load a JPEG bitmap file.
  • wxBITMAP_TYPE_PNG: Load a PNG bitmap file.
  • wxBITMAP_TYPE_PCX: Load a PCX bitmap file.
  • wxBITMAP_TYPE_PNM: Load a PNM bitmap file.
  • wxBITMAP_TYPE_TIFF: Load a TIFF bitmap file.
  • wxBITMAP_TYPE_TGA: Load a TGA bitmap file.
  • wxBITMAP_TYPE_XPM: Load a XPM bitmap file.
  • wxBITMAP_TYPE_ICO: Load a Windows icon file (ICO).
  • wxBITMAP_TYPE_CUR: Load a Windows cursor file (CUR).
  • wxBITMAP_TYPE_ANI: Load a Windows animated cursor file (ANI).
  • wxBITMAP_TYPE_ANY: Will try to autodetect the format.
indexIndex of the image to load in the case that the image file contains multiple images. This is only used by GIF, ICO and TIFF handlers. The default value (-1) means "choose the default image" and is interpreted as the first image (index=0) by the GIF and TIFF handler and as the largest and most colourful one by the ICO handler. RemarksDepending on how wxWidgets has been configured and by which handlers have been loaded, not all formats may be available. Any handler other than BMP must be previously initialized with wxImage::AddHandler or wxInitAllImageHandlers.
wxWidgets: wxImage Class Reference
rgleason is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beta Marine Diesel michaelmrc Engines and Propulsion Systems 48 23-03-2016 13:44
Need some technical advice....antennas. Just a Tinch Marine Electronics 15 01-12-2007 15:57
Blue Sea Systems Technical Brief GordMay Electrical: Batteries, Generators & Solar 0 16-03-2007 04:16
technical difficulties witchcraft The Sailor's Confessional 1 30-05-2005 14:09
Dow Corning Technical Manual GordMay The Library 0 12-04-2005 16:25

Advertise Here


All times are GMT -7. The time now is 21:09.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.