QNavitCtl - Navit Bookmarks via dbus

Christian Rüb christian.rueb at gmx.net
Fri Jan 1 22:53:24 CET 2010


Hi Ed,

Happy New Year as well!

I found the path by looking at the newer wiki page example at the bottom [1] and the source [2].

Meanwhile I built a newer version of qnavitctl for SHR-U, you can find a package here [3] and source here [4].
I also enabled flickcharm "kinetic scrolling" [5].

I also noticed, that on my Frerunner navit was started automatically if it was not running yet, when passing a dbus call via qnavitctl...

Cheers,
 Christian

[1] http://wiki.navit-project.org/index.php/Dbus
[2] http://navit.svn.sourceforge.net/viewvc/navit/trunk/navit/navit/binding/dbus/binding_dbus.c?view=markup
[3] http://openmoko.senfdax.de/shr-new-unstable/
[4]http://git.senfdax.de/?p=qnavitctl;a=summary
[5] http://labs.qt.nokia.com/blogs/2009/07/19/kinetic-scrolling-on-any-widgets/

> Hi Christian,
> 
> Thanks a million, it works like a charm!
> 
> How did you come to use "default_navit" ?
> I took a look at the source code, but i couldn't find out how to use it.
> 
> Happy new-year, my has started perfectly ;-)
> 
> Kind regards,
> Ed
> 
> 
> 
> Christian Rüb wrote:
> > Hi Ed,
> >
> > try this:
> >
> > dbus-send --print-reply --dest=org.navit_project.navit /org/navit_project/navit/default_navit org.navit_project.navit.navit.set_center string:"12.1906 48.999"
> >
> > I had a look at [1] and after several tries this worked (on my PC). I will update qnavitcl soon - New Year's Eve is too close right now ;-)
> > Not sure if this is the correct way though - no reply on navit user ML yet...
> >
> > Cheers,
> >  Christian
> >
> > [1] http://navit.svn.sourceforge.net/viewvc/navit/trunk/navit/navit/binding/dbus/binding_dbus.c?view=markup
> >
> > Am Mittwoch, 30. Dezember 2009 schrieb Ed Kapitein:
> >   
> >> Hi Christian,
> >>
> >> Thanks a lot for your explanation!
> >> I think i had the same problem you had, i can't set a destination with
> >> the current version of navit.
> >> (Dbus is enabled)
> >> So, i will ask the people from the navit team on how to use dbus with
> >> the current version.
> >>
> >> Thanks again and "happy new year" everybody.
> >> Kind regards,
> >>
> >> Ed
> >>
> >> Christian Rüb wrote:
> >>     
> >>> Hi Ed,
> >>>
> >>> to build it on your PC, you need to have qmake (from Qt) installed.
> >>> Then simply run
> >>> #qmake
> >>> (the name may differ, liket qmake-qt4 or something)
> >>> This will create your Makefile, then simply run
> >>> #make
> >>> and you are done, you will get one binary called "qnavitcl" - that's it.
> >>>
> >>> If you want to build for your Openmoko phone, use my bitbake recipe here (simply copy to your OE tree) and it will build the package for you.
> >>>
> >>> If you want a prebuilt binary - get it from here [1] (you'll also get dependencies from there). It is built for SHR-U.
> >>>
> >>> Have you enabled dbus in navit.xml? This is essential.
> >>>
> >>> Use dbus-send to get a navit instance and then you can control it through the path you get back. Have a look at [2] how I did it in Qt:
> >>> registerNavitInstance() and setCenter() will be of most interest for you.
> >>>
> >>> If you use dbus-send, you also need to print the replies - otherwise you cannot use them ;-) - see man page for futher details
> >>>
> >>> BUT - with current version of navit I could not get it to work as the dbus interface seems to have changed - "iter" does not exist anymore and I have not found a way yet to get an instance and set destination :(
> >>>
> >>> Cheers,
> >>>  Christian
> >>>
> >>> [1] http://openmoko.senfdax.de/shr-new-unstable/
> >>> [2] http://git.senfdax.de/?p=qnavitctl;a=blob;f=src/mainwindow.cpp;h=a7b076db790971245b2d4c6769f13ba92b194b3e;hb=a3d4e3ea1506321d09a735e69810e3be01ccc860
> >>>
> >>>   
> >>>       
> >>>> Hi Christian,
> >>>>
> >>>> i am trying to use navit and dbus, but so far i haven't find out how to
> >>>> do it.
> >>>> I did download your source, but how do i build it?
> >>>> ( real noob here...)
> >>>> Could you explain how to build it from source?
> >>>> I am used to ./configure, make, make install
> >>>>
> >>>> Can you give an example of dbus-send to set a destination in navit?
> >>>> i want, like you, to have a list of waypoints and i want to set waypoint
> >>>> 2 as destination, as soon as i am near waypoint 1.
> >>>>
> >>>> Thanks a lot in advance.
> >>>>
> >>>> Kind regards,
> >>>> Ed
> >>>>
> >>>> Christian Rüb wrote:
> >>>>     
> >>>>         
> >>>>> I wrote a little Qt app to send destination or position to Navit via dbus (needs to be activated in navit.xml first) or center the map.
> >>>>> package [1]
> >>>>> source [2]
> >>>>> screenshot [3]
> >>>>>
> >>>>> How to use it:
> >>>>> create a file with name;lat;lon per line and start the program. If the file is named bookmarks.csv and placed in $HOME or the directory where qnavitctl is started this file is automatically loaded.
> >>>>>
> >>>>> Why a program that does what Navit already can do?
> >>>>>  - for me it is a quick fix for #352 in navit
> >>>>>  - for my 1k+ trip I have to prepare intermdeiate stops as otherwise route calculation would take very long (if it would succeed at all), so I can have my navit window and another window to set next destination easily
> >>>>>  - it is an example how to talk to navit via dbus and could be used for other apps (e.g. litephone) to get coordinates (e.g. from opimd) and start navigation in navit through a button (e.g. you receive a text containing coordinates, press "take me there" and the coordinates are send as destination to navit via dbus)
> >>>>>  - I am still learning Qt :)
> >>>>>
> >>>>> That's all
> >>>>>
> >>>>> [1] http://openmoko.senfdax.de/shr-unstable/
> >>>>> [2] http://git.senfdax.de/?p=qnavitctl;a=summary
> >>>>> [3] http://openmoko.senfdax.de/screenshots/qnavitctl.png
> >>>>>
> >>>>> _______________________________________________
> >>>>> Openmoko community mailing list
> >>>>> community at lists.openmoko.org
> >>>>> http://lists.openmoko.org/mailman/listinfo/community
> >>>>>
> >>>>>
> >>>>>   
> >>>>>       
> >>>>>           
> >>>
> >>>   
> >>>       
> >
> >
> >
> >   
> 




More information about the community mailing list