navit-project.org

forum for navit navigation tool
It is currently 24 Jun 2017, 12:04
View unanswered posts | View active topics


All times are UTC


Forum rules


Feel free to ask anything here related to the installation and configuration of Navit.

Some notes before your first post:

Please provide as much informations as possible:



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: How to get the information, navigation_next_turn OSD is ...
PostPosted: 14 Jul 2014, 09:06 
Offline

Joined: 11 Jul 2014, 07:29
Posts: 11
Location: Dresden/Ger
... based upon?

Hello Forum,

I am planning to use NAVIT on a Raspberry Pi. There will be a 320x234px 5" Colour-TFT and a 128x64px monochrome LCD. The TFT will draw the navit gui and the monochrome LCD will be placed in the dashboard of the car. The dashboard LCD will be driven by an Atmel AVR, the AT90CAN128. The AVR and the Pi will communicate via I²C/TWI.

I'd like to display an arrow and the distance to the next intersection on the dashboard.

So the question is: Where do I find the information, that is used to display the naviagation_next_turn OSD?

Sadly I am not that experienced with linux programming and most coding I did is for AVR microcontrollers.

Thanks in advance,

Robert


 Profile  
 
 Post subject: Re: How to get the information, navigation_next_turn OSD is
PostPosted: 14 Jul 2014, 13:25 
Offline
User avatar

Joined: 07 Jun 2013, 17:13
Posts: 146
Location: Tartu, Estonia
Have a look at navit/osd/core/osd_core.c, in particular the function osd_nav_next_turn_draw. Basically, this function reads out what is the next turn instruction, and then picks an icon file with the arrow to display. For the distance to the next turn, see osd_text_draw - basically it retrieves the distance to the next turn and formats it as text.


 Profile  
 
 Post subject: Re: How to get the information, navigation_next_turn OSD is
PostPosted: 17 Mar 2015, 21:32 
Offline

Joined: 11 Jul 2014, 07:29
Posts: 11
Location: Dresden/Ger
Is there a chance to get this information over dbus or stdout? Without building navit from source?


 Profile  
 
 Post subject: Re: How to get the information, navigation_next_turn OSD is
PostPosted: 18 Mar 2015, 20:39 
Offline

Joined: 27 Sep 2013, 21:10
Posts: 42
That's interesting Robert as I have started toying with a Oled display driven by a SSD1306 myself. My goal is similar, display the next turn on a separate screen ( the communication is also over i2c on a raspberry pi ).

I was able to draw arbitrary shape outside of Navit so far, so converting my test code to a plugin that would display the next turn and other arbitrary information should be quite easy.

I am not aware of a dbus call that would provide this information (although it should not be too difficult to add), and I'm not sure that relying on stdout would be the best idea.

If Navit is running on the pi that drives the LCD, why not using the same approach ? ( the less components in between the easier and more reliable it should be ).


 Profile  
 
 Post subject: Re: How to get the information, navigation_next_turn OSD is
PostPosted: 18 Mar 2015, 22:06 
Offline

Joined: 11 Jul 2014, 07:29
Posts: 11
Location: Dresden/Ger
KaZeR wrote:
I was able to draw arbitrary shape outside of Navit so far, so converting my test code to a plugin that would display the next turn and other arbitrary information should be quite easy.
Nice.

KaZeR wrote:
If Navit is running on the pi that drives the LCD, why not using the same approach ?
Maybe I misunderstood, but the pi doesn't drive the dashboard-LCD.

The LCD is driven by the dashboard-LCD-microcontroller. The pi is some kind of I2C master with some I2C (microcontroller) slaves. The pi will also send some data of the music player to the dashboard-IC via I2C. It could send next_turn-data too.

On the wiki is a "dbus get attribute" magic miracle, which led me to the dbus-idea. I don't understand that far enough to get if it's possible via dbus or not.


 Profile  
 
 Post subject: Re: How to get the information, navigation_next_turn OSD is
PostPosted: 18 Mar 2015, 22:35 
Offline

Joined: 27 Sep 2013, 21:10
Posts: 42
Ok I might need a few clarifications about your setup then.

Are you running navit and your own gui on the Pi itself ? ( I would assume so ).

If the IC of your dashboard is only used to drive your dashboard display, then you can offload most of the job to the pi. And even directly in Navit. This is exactly like my setup : rpi <- i2c -> display

I am not aware of a way to convey dbus over i2c otherwise. Dbus is really meant to be an inter-process communication.

Where are you planning to run your code to draw what you will display on your dashboard lcd ?

Also i guess that your dashboard LCD is the 128x64 monochrome ?
What bus are you using for the 320x234 TFT ? SPI ?


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Silver Orange 2.0.6 for IPB Designed by Skins and Hosting
Converted for phpBB3, based on Royal Blue template by BigB © 2007 2008 AEON KINGS