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-11-2010, 10:20   #31
Registered User
 
sailias's Avatar

Join Date: Mar 2010
Location: Canada
Boat: On the Hard
Posts: 336
Pluging Manager

Quote:
Originally Posted by bdbcat View Post
Gunther....

What we need is a PlugIn that is a PlugIn manager.

It would know how to poll the opencpn.org site for updates, do the install, revert to previous versions, etc, etc...

Good idea! Any takers?

Dave
Not a programmer but I do use QGIS and it comes with exactly what you are looking for. I believe it all written in Python which is platform independent, so perhaps there is a suitable model there. At least its worth a look as to how large projects deal with the pluggin issue and delivery. Currently there are well over 50 or so pluggins for QGIS.

Best of luck

/ch
sailias is offline   Reply With Quote
Old 09-11-2010, 15:26   #32
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 340
Plugin API update

Hi, I tried some changes to the plugin manager, please test and comment

FS#228 : Plugin API update

Thanks
Attached Thumbnails
Click image for larger version

Name:	0032-Screenshot.png
Views:	315
Size:	48.3 KB
ID:	21000  
SethDart is offline   Reply With Quote
Old 10-11-2010, 02:21   #33
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Jean-Eudes ...

Get an error when trying to apply Patch 033 (on a fresh GIT clone on Windows). Patch 031 and 032 could be applied without any problem.

Anything I can do to provide you with more useful information?
I am using the GIT Extensions for Windows.

Gunther

PS: The screen shot already looks very promising ...!
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 10-11-2010, 02:34   #34
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 340
Quote:
Originally Posted by Netsurfer View Post
Get an error when trying to apply Patch 033 (on a fresh GIT clone on Windows). Patch 031 and 032 could be applied without any problem
Yes, these patches were applied over my "patch stack" awaiting push to git:

0026 - Config font size (FS#184)
0027 - SetToolbarItemState (FS#203)
0028 - Toggle toolbar button (FS#198)
0029 - Toggle off when pane is closed (FS#198)
0030 - Allow lowercase filenames in CM93 dic (FS#216)

You'll find these patches in the corresponding bugs in flyspray.

Thanks
SethDart is offline   Reply With Quote
Old 10-11-2010, 02:57   #35
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Jean-Eudes...

thanks for your quick reply.
Took another fresh clone and applied all patches starting with 026. Up to patch 032 again no problem but I still get the following error message on patch 033:
Quote:
D:\Program Files\Git\cmd\git.cmd am --3way --signoff "F:/GIT/0033-Plugin-update-to-API-1.2.patch"
Applying: Plugin update to API 1.2
Using index info to reconstruct a base tree...
<stdin>:4561: trailing whitespace.
icons.h
error: patch failed: plugins/grib_pi/src/CMakeLists.txt:73
error: plugins/grib_pi/src/CMakeLists.txt: patch does not apply
Did you hand edit your patch?
It does not apply to blobs recorded in its index.
Cannot fall back to three-way merge.
Patch failed at 0001 Plugin update to API 1.2
When you have resolved this problem run "git am -3 --resolved".
If you would prefer to skip this patch, instead run "git am -3 --skip".
To restore the original branch and stop patching run "git am -3 --abort".

Done
Anything else I have to take care of?

Gunther
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 10-11-2010, 03:37   #36
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 340
Problem found:
This file is in DOS format. Looks like git diff cannot handle this cleanly (mix unix & dos files in one patch). Can you remove that chunk from 0033 patch and patch it by hand:
in plugins/grib_pi/src/CMakeLists.txt:73
+ icons.cpp
+ icons.h
SethDart is offline   Reply With Quote
Old 10-11-2010, 04:07   #37
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Jean-Eudes ...

again many thanks for your help - now it worked and I could compile it without any error.

AFAIS everything seems to work properly except the list on the Plugin tab. It affects all plugins in the list and is getting worse each time you click on plugin entry.

But it only seems to affect the appearance (not the function).
And when selecting another tab and coming back all looks OK and even the selection is remembered.

Could not find any other problem so far!

Personally I find this is a much better solution than the one before and I like it very much.

And as there are many Firefox users out there I guess most users that are already familiar with FF will have no problems at all with this system.

Many thanks for all your hard work on this ...!

Gunther
Attached Thumbnails
Click image for larger version

Name:	Plugin-Api_01.PNG
Views:	268
Size:	74.0 KB
ID:	21011  
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 10-11-2010, 04:50   #38
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 340
Can you try this change
in void PluginListPanel::SelectPlugin(..) in src/pluginmanager.cpp:1032
Layout();
+ Refresh(false);
}
SethDart is offline   Reply With Quote
Old 10-11-2010, 05:01   #39
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Quote:
Originally Posted by SethDart View Post
Can you try this change
in void PluginListPanel::SelectPlugin(..) in src/pluginmanager.cpp:1032
Layout();
+ Refresh(false);
}
I tried it ...
and it did the trick!

If I'll find any other error I will report it in the tracker.

BTW: Is there already a solution for the localizing system for the plugins (the two integrated one's and external)?

Many thanks again for all your efforts!

Gunther
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 01-04-2012, 12:57   #40
mrm
Registered User

Join Date: Feb 2011
Location: Poland, EU
Boat: crew on Bavaria 38 Cruiser
Posts: 653
Re: OpenCPN PlugIn - current Plugin API

Hello,

Is it possible for a plugin, with the current plugin API to:

- request to have more than one button in the menu bar?
- request a dynamic creation/removal of an additional button(s) in the menu bar?
- request creation of a docked button bar specific to a plugin?

Marius
mrm is offline   Reply With Quote
Old 01-04-2012, 18:04   #41
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,615
Re: OpenCPN PlugIn Development

mrm...

Answer:
yes, yes, and yes.

What do you have in mind? Now is a very good time to propose extensions to the PlugIn API, as we are working toward a new Release in May, 2012.

Anything to make your life easier?

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 02-04-2012, 03:06   #42
mrm
Registered User

Join Date: Feb 2011
Location: Poland, EU
Boat: crew on Bavaria 38 Cruiser
Posts: 653
Re: OpenCPN PlugIn Development

Dave, good news.

At the moment I want to (time permitting) just play with the code. My idea is to take a current GRIB plugin as an example and make it behave more to my liking, i.e. have its layer constantly on, with just a button or two to control jumps between data on a time scale. Also add some logic to the code, to pick the most appropriate data file automatically and display the file dialog only on request or when no current data can be found.

The ultimate goal is to learn the plugin api (layers and controls) to be able to present an incoming data from a device and to be able to control such a device (therefore the need for a button bar).

Good api documentation would be helpful, but, as it is still open to changes it is a volatile target and any docs written may get obsoleted fast. I will just read the source. However, adding tagged comments to source would be a good idea imho, as having them makes generating documentation with Doxygen easy.

Greetings,
Marius
mrm is offline   Reply With Quote
Old 06-04-2012, 11:41   #43
Registered User

Join Date: Sep 2011
Posts: 205
Re: OpenCPN PlugIn Development

Hello Dave,

i wrote a logbook-plugin (0.915)for OCPN with a option "waypoints arrived".
this will work only if a NMEA-Device sends the right waypoint-sentence
(some GPS-mouse won't work).
a better solution would be, the main-prg sends a event. i made a few
modifications in ver. 1511 to show what i mean. you can see it here. to check it with the logbook (0.916)download this
i used wxJSON to manage the data exchange. Do you plan to implement JSON
in the future ?

also useful for plugin-programmers is getting data from the routemanager(routes, waypoints, tracks, layers).

if something sounds strange it's because my bad english, please excuse.

best regards
konni
konni is offline   Reply With Quote
Old 09-04-2012, 09:23   #44
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,615
Re: OpenCPN PlugIn Development

Konni....

I think wxJSON is a good idea.

I implemented your patch, with very slight modification, for the next Beta, coming soon. btw, had some trouble building wxJSON on Windows. I had to edit json_defs.h slightly.

I suppose I should define and send JSON messages to PlugIns for other Route related events, such as :

Activate,
Deactivate,
Waypoint Arrival,

Maybe your logbook does not require these messages, but others might.

Any other ideas?

nohal & sethdart:
The JSON message stream will soon be available.
Any event-based messages from the core that particularly interest you?

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 09-04-2012, 09:45   #45
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,278
Re: OpenCPN PlugIn Development

Dave...
A while ago I've started to put together some docs of what we have and what I feel we should implement in the messaging area, later extended by konni with logbook's messages at https://github.com/nohal/OpenCPN/wik...-messaging-API
Accidentally I came up with exactly the same messages as you did...
Right now I can't think of much else - navobject management (creation, deletion modification) is imho not a good use case for this.
Perhaps a request-response interface to the tide/current prediction comes to mind.

Pavel
nohal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
New Marina Development in China GordMay Pacific & South China Sea 4 29-09-2009 05:33
New Battery Research & Development BlueSovereign Electrical: Batteries, Generators & Solar 7 31-07-2009 15:47
Nautical Development 39 (Morgan 39?) riptide Monohull Sailboats 1 22-07-2009 12:53
Turks and Caicos Development Petition Canibul Atlantic & the Caribbean 5 24-04-2008 19:15

Advertise Here


All times are GMT -7. The time now is 22:57.


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.