Rasbats / DR_pi

Add DR positions to a route (saved as a GPX file)
GNU General Public License v3.0
2 stars 29 forks source link

Plugin does not show up in OPENCPN 5.0 #7

Closed danielopes92 closed 3 years ago

danielopes92 commented 5 years ago

Hello, I did the deployment of your last version of DR_pi. I use the opencpn.lib (4.2-vc120_xp) https://osdn.net/projects/sfnet_opencpnplugins/downloads/opencpn_lib/4.2-vc120_xp/opencpn.lib/

and it has generated the dll fine! However when i add it to the OPENCPN's plugin folder it does not shows up on plugins tab to be enabled. Do you have any idea? I'am using the wxwidgets 3.1.2 and the VS_140 libraries.

rgleason commented 5 years ago

opencpn.lib (4.2-vc120_xp) --Incorrect lib. you need 5.0 vc141 version! Look at some other plugins compiled for 5.0

Rasbats commented 5 years ago

Daniel ... I will add an 'opencpn.lib' v5.0 to the last release here. Mike

Rasbats commented 5 years ago

Daniel ... Remove the .pdf extension!!! Mike

danielopes92 commented 5 years ago

Hello, Sorry if i'am bother you but here is the library?

danielopes92 commented 5 years ago

Thank you very much for the help

danielopes92 commented 5 years ago

Hello, I understand what is the mistake but, where can i find the opencpn lib V5.0? I've been searching and i found a zip file from openCPN web site were we can have all versions until 4.8.0. Should i compile something to get the last version? I also realize that the wxwidgets 3.1.2 setup does not has the vc_dll which is normal (i think...). I got that from here: https://www.wxwidgets.org/downloads/ . I did the download of Visual studio 2017 32bit development files from there. and i move it to lib folder of wxwidgets 3.1.2. I also tried use the opencpn.lib (4.99.1405-vc141_xp). It compiles but does not shows up on opencpn plugins tab. Thank you.

Rasbats commented 5 years ago

OK, I guess you could not see the file on the release. opencpn.lib.pdf

Remove the .pdf file extension.

Mike

danielopes92 commented 5 years ago

DONE!! I had to recompile the wxwidgets libraries using the cmake. With the new vs_dll libs and your opencpn.lib the plugin is now working! THANK YOU!!! Just one more question: can i compile and generate the opencpn.lib? How? Is it generated when i compile the opencpn project? Thank you!!

rgleason commented 5 years ago

Yes. Look at the appveyor builds for opencpn. Just build opencpn and find opencpn.lib

For more info about versions, wxwidgets and backward PI compatibility read the dev manual

danielopes92 commented 5 years ago

Thank you! I dont know if you can help but have one question about place a custom icon on OPENCPN map. I did that already using the ocpn_plugin.h functions:

PlugIn_Waypoint m_pMark = new PlugIn_Waypoint(lat, lon, _T("myIcon"), _T("MyWaypointIcon"), _T("myIconWP")); AddSingleWaypoint(m_pMark, false);

My objective is now rotating the icon with a given angle. I'm struggling to find a way to do that. Do you know anything about that?

Sorry i know that this is not related with this discussion subject.

Rasbats commented 5 years ago

I don't think the OpenCPN API has a function for rotating the waypoint icon. If you only want a small number of angles you may have to make icons for each angle and program the selected icon according to the angle.

Do you need to use waypoint icons? The OTCurrent plugin shows how a polygon can be placed on the chart at a given angle, with text alongside if needed.

Mike

danielopes92 commented 5 years ago

Thank you! I'll take a look

Rasbats commented 5 years ago

Or maybe better ... I have been playing with another nav simulator. The icons for the ships can be rotated. No need to worry about the arrow polygon. https://github.com/Rasbats/onavsim_pi