navit-project.org

forum for navit navigation tool
It is currently 20 Aug 2017, 17:30
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  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: next street in route
PostPosted: 23 Aug 2014, 18:48 
Offline

Joined: 24 Jul 2013, 04:54
Posts: 13
tauso wrote:
DAP wrote:
Could you point me at some documentation describing what kind of conditionals are allowed in XML files?


Of course, it's in the Wiki. But i've tried the above for myself and it seams navigation.item doesn't work in this conditionals.

Unfortunately, it looks like "command=" only executes when someone clicks on an item. from the wiki: "The command will be called when the item is clicked.". So this is not useful in this context.

I did try an alternative I found in the wiki:
Code:
      <osd name="next_street_cmdif" update_period="1" enabled="yes" type="cmd_interface" w="450" h="25" x="200" y="15" command='osd_set_attr("next_street_text","label",
         ( navigation.item[1].street_name!="" && navigation.item[1].street_name_systematic !="")    ? navigation.item[1].street_name :
         ((navigation.item[2].street_name!="" && navigation.item[2].street_name_systematic !="")    ? navigation.item[2].street_name :
         ((navigation.item[3].street_name!="" && navigation.item[3].street_name_systematic !="")    ? navigation.item[3].street_name :
         ((navigation.item[4].street_name!="" && navigation.item[4].street_name_systematic !="")    ? navigation.item[4].street_name : navigation.item[5].street_name
         ))))
         '  />

Unfortunately, if this code is in the xml file, navit errors out on my pandora with the following error message:
./navit: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

Once this happens, it is not sufficient to comment this code out, I must comment this code out, and then restart my pandora before I can run Navit again.
This makes it increadibly difficult to debug this code.


 Profile  
 
 Post subject: Re: next street in route
PostPosted: 23 Aug 2014, 21:34 
Offline

Joined: 24 Jul 2013, 04:54
Posts: 13
I have installed Navit on my desktop for testing to avoid the problem on my Pandora. With this setup, I was able to find a few errors in my code and fix them. The code is currently as follows:
Code:
      <osd name="next_street_text" enabled="yes" type="text" label="initializing" x="200" y="0" />
      <osd name="next_street_cmdif" update_period="1" enabled="yes" type="cmd_interface" w="450" h="25" x="200" y="0" command='osd_set_attr("next_street_text","label",
         ( (navigation.item[1].street_name != "") &amp;&amp; (navigation.item[1].street_name_systematic != ""))    ? navigation.item[1].street_name :
         (((navigation.item[2].street_name != "") &amp;&amp; (navigation.item[2].street_name_systematic != ""))    ? navigation.item[2].street_name :
         (((navigation.item[3].street_name != "") &amp;&amp; (navigation.item[3].street_name_systematic != ""))    ? navigation.item[3].street_name :
         (((navigation.item[4].street_name != "") &amp;&amp; (navigation.item[4].street_name_systematic != ""))    ? navigation.item[4].street_name : navigation.item[5].street_name
         )))))
         '  />

Unfortunately, this results in a continuous stream of errors:
"navit:command_evaluate:error 10 starting at 1].street_name != "") && (navig"
It is not clear to me what it is complaining about, and google was not helpful here.


 Profile  
 
 Post subject: Re: next street in route
PostPosted: 31 Aug 2014, 05:24 
Offline

Joined: 24 Jul 2013, 04:54
Posts: 13
I am stuck. I really don't know what to try next.
Does that error message mean that what I am trying to do is impossible?


 Profile  
 
 Post subject: Re: next street in route
PostPosted: 26 Oct 2014, 18:10 
Offline

Joined: 24 Jul 2013, 04:54
Posts: 13
*crickets*


 Profile  
 
 Post subject: Re: next street in route
PostPosted: 27 Oct 2014, 14:10 
Offline

Joined: 10 Aug 2014, 16:04
Posts: 14
DAP wrote:
*crickets*

their noise made me make a trac ticket for it




http://trac.navit-project.org/ticket/1271

regards,
Jan


 Profile  
 
 Post subject: Re: next street in route
PostPosted: 27 Oct 2014, 16:09 
Offline

Joined: 24 Jul 2013, 04:54
Posts: 13
Jandegr wrote:
DAP wrote:
*crickets*

their noise made me make a trac ticket for it




http://trac.navit-project.org/ticket/1271

regards,
Jan


Thank you. Now I wonder how long this will take to filter down to the Pandora version.


 Profile  
 
 Post subject: Re: next street in route
PostPosted: 29 Oct 2014, 16:48 
Offline

Joined: 10 Aug 2014, 16:04
Posts: 14
Hi,
solving it through command.c seems to be not trivial and those commands with
periodical reevaluation also take quite a bit of CPU.
With 5 of them active and a refresh of 1 second I can make the device unresponsive.
Below another solution, functionally almost identical to the solution with a command.
Code:
<osd enabled="yes" name="next_street" type="text" align="4" label=">${navigation.item[1].street_name} ${navigation.item[1].street_name_systematic}>${navigation.item[2].street_name} ${navigation.item[2].street_name_systematic}>${navigation.item[3].street_name} ${navigation.item[3].street_name_systematic}" w="320" x="125" y="135"/>


The available names shift to the left and the brackets give an indication of the number
of unnamed sections.
Unfortunatly through navigation.item we can only have street_name_systematic if there
is a street_name for the same section.

regards,
Jan


 Profile  
 
 Post subject: Re: next street in route
PostPosted: 01 Jun 2016, 15:38 
Offline

Joined: 13 Oct 2013, 15:34
Posts: 9
This is a beautifully simple solution - thank you very much! This issue has been bugging me for a good while now - you glance at Navit and have no idea what road is next and what street sign you are supposed to look for. I've tried your suggestion on my laptop just now and it works a treat! On my laptop I could even add both the street_name and street_name_systematic - and it works for all the elements of the array.


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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