Adding external commands to Navit

Home Forums Forums General discussion Adding external commands to Navit

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6753
    Mark
    Participant

    I’m an old duffer slowly learning Python and Raspberry Pi 3, but very very slowly am starting to get somewhere. I’m building a motorhome computer (as opposed to a carputer) and after buying your BerryIMU (which worked perfectly out of the packet) I feel that I am getting closer to what I want to achieve.

    Part of my design involves Navit and I have followed all of your instructions and everything is working perfectly.

    All I need to do now (I think) is add a button onscreen which will allow me to run, for example, BerryIMU.py

    I have managed to insert an onscreen button ready to do my bidding, but it doesn’t want to obey me, can you help?

    Right hand side of screen we have the zoom in and zoom out buttons and I have added a button underneath which I would like to run BerryIMU.py

    I have tried variations of command=’gui.spawn(“BerryIMU.py”)’ and command=’gui.spawn(“python”,”BerryIMU”)’  to no avail. The documentation for Navit isn’t really giving me the examples that I would like it to give me!

    Can you help?

    Many thanks.

    #6757
    Mark Williams
    Keymaster

    maybe you need to include the full path and python

    command=’gui.spawn(“python /home/pi/BerryIMU.py”)’

    Mark --OzzMaker.com --

    #6760
    Mark
    Participant

    Thanks for your quick reply. Sadly that doesn’t work either. Trying to simplify things I have tried just calling Python as in the code below:-

    <osd type=”button” x=”-65″ y=”120″ command=”zoom_out()” src=”Zoom_out.xpm” />
    <osd type=”button” x=”-65″ y=”180″ command=’gui.spawn(“python”)’ src=”Zoom_out.xpm” />

    The first line of code is yours, the second is my version.

    I’ll try and ask the question on the Navit forum and report back if I get a solution.

     

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Blip, blop, bloop…