Skip to content

Commit

Permalink
[python] messages: PPRZ_HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Feb 2, 2015
1 parent a2f55f6 commit 6605676
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
11 changes: 8 additions & 3 deletions sw/ground_segment/python/messages_app/messagesframe.py
@@ -1,12 +1,17 @@
import wx

import sys
import os
import time
import threading

PPRZ_HOME = os.getenv("PAPARAZZI_HOME")
sys.path.append(PPRZ_HOME + "/sw/lib/python")
from os import path, getenv

# if PAPARAZZI_SRC not set, then assume the tree containing this
# file is a reasonable substitute
PPRZ_SRC = getenv("PAPARAZZI_SRC", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../../')))
sys.path.append(PPRZ_SRC + "/sw/lib/python")

PPRZ_HOME = getenv("PAPARAZZI_SRC", PPRZ_SRC)

from ivy_msg_interface import IvyMessagesInterface
import messages_xml_map
Expand Down
7 changes: 6 additions & 1 deletion sw/lib/python/messages_xml_map.py
Expand Up @@ -4,7 +4,12 @@

import os

default_messages_file = '%s/conf/messages.xml' % os.getenv("PAPARAZZI_HOME")
# if PAPARAZZI_HOME not set, then assume the tree containing this
# file is a reasonable substitute
PPRZ_HOME = os.getenv("PAPARAZZI_HOME", os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)),
'../../../')))

default_messages_file = '%s/conf/messages.xml' % PPRZ_HOME

message_dictionary = {}
message_dictionary_types = {}
Expand Down

0 comments on commit 6605676

Please sign in to comment.