diff --git a/sw/ext/pprzlink b/sw/ext/pprzlink index 7c7d0abe59..4e92b01af2 160000 --- a/sw/ext/pprzlink +++ b/sw/ext/pprzlink @@ -1 +1 @@ -Subproject commit 7c7d0abe596a1fee86295612cc9b7f4594c7e09d +Subproject commit 4e92b01af2ee370f0aa3158ee39c9972e86a016e diff --git a/sw/ground_segment/joystick/gb2ivy.py b/sw/ground_segment/joystick/gb2ivy.py index ff3a3f0d77..624ee6bce7 100755 --- a/sw/ground_segment/joystick/gb2ivy.py +++ b/sw/ground_segment/joystick/gb2ivy.py @@ -5,11 +5,12 @@ from __future__ import print_function import sys from os import path, getenv -# if PAPARAZZI_SRC not set, then assume the tree containing this +# if PAPARAZZI_SRC and PAPARAZZI_HOME not set, then assume the tree containing this # file is a reasonable substitute +PPRZ_HOME = getenv("PAPARAZZI_HOME", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../'))) PPRZ_SRC = getenv("PAPARAZZI_SRC", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../'))) -sys.path.append(PPRZ_SRC + "/sw/lib/python") -sys.path.append(PPRZ_SRC + "/sw/ext/pprzlink/lib/v1.0/python") +sys.path.append(PPRZ_SRC + "/sw/lib/python") # settings_xml +sys.path.append(PPRZ_HOME + "/var/lib/python") # pprzlink from pprzlink.ivy import IvyMessagesInterface from pprzlink.message import PprzMessage diff --git a/sw/ground_segment/python/atc/atc_frame.py b/sw/ground_segment/python/atc/atc_frame.py index 1e9127b64d..e61bec2ed0 100644 --- a/sw/ground_segment/python/atc/atc_frame.py +++ b/sw/ground_segment/python/atc/atc_frame.py @@ -28,10 +28,10 @@ import array from cStringIO import StringIO -PPRZ_SRC = os.getenv("PAPARAZZI_SRC", os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), +PPRZ_HOME = os.getenv("PAPARAZZI_HOME", os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../../..'))) -sys.path.append(PPRZ_SRC + "/sw/ext/pprzlink/lib/v1.0/python") +sys.path.append(PPRZ_HOME + "/var/lib/python") from pprzlink.ivy import IvyMessagesInterface diff --git a/sw/ground_segment/python/dashboard/radiowatchframe.py b/sw/ground_segment/python/dashboard/radiowatchframe.py index 83ee58718a..35c4b9b3ff 100644 --- a/sw/ground_segment/python/dashboard/radiowatchframe.py +++ b/sw/ground_segment/python/dashboard/radiowatchframe.py @@ -8,7 +8,10 @@ import math import pynotify import pygame.mixer -sys.path.append(os.getenv("PAPARAZZI_HOME") + "/sw/ext/pprzlink/lib/v1.0/python") +# if PAPARAZZI_HOME not set, then assume the tree containing this +# file is a reasonable substitute +PPRZ_HOME = getenv("PAPARAZZI_HOME", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../../'))) +sys.path.append(PPRZ_HOME + "/var/lib/python") from pprzlink.ivy import IvyMessagesInterface diff --git a/sw/ground_segment/python/guided_mode_example.py b/sw/ground_segment/python/guided_mode_example.py index 26acb03e4b..22b802a5b2 100755 --- a/sw/ground_segment/python/guided_mode_example.py +++ b/sw/ground_segment/python/guided_mode_example.py @@ -5,11 +5,12 @@ from __future__ import print_function import sys from os import path, getenv -# if PAPARAZZI_SRC not set, then assume the tree containing this +# if PAPARAZZI_SRC or PAPARAZZI_HOME 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__)), '../../../'))) +PPRZ_HOME = getenv("PAPARAZZI_HOME", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../../'))) +PPRZ_SRC = getenv("PAPARAZZI_SRC", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../../'))) sys.path.append(PPRZ_SRC + "/sw/lib/python") -sys.path.append(PPRZ_SRC + "/sw/ext/pprzlink/lib/v1.0/python") +sys.path.append(PPRZ_HOME + "/var/lib/python") # pprzlink from pprzlink.ivy import IvyMessagesInterface from pprzlink.message import PprzMessage diff --git a/sw/ground_segment/python/messages_app/messagesframe.py b/sw/ground_segment/python/messages_app/messagesframe.py index 14836f7554..3fe2a0777b 100644 --- a/sw/ground_segment/python/messages_app/messagesframe.py +++ b/sw/ground_segment/python/messages_app/messagesframe.py @@ -6,13 +6,10 @@ import threading from os import path, getenv -# if PAPARAZZI_SRC not set, then assume the tree containing this +# if PAPARAZZI_HOME 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") -sys.path.append(PPRZ_SRC + "/sw/ext/pprzlink/lib/v1.0/python") - -PPRZ_HOME = getenv("PAPARAZZI_HOME", PPRZ_SRC) +PPRZ_HOME = getenv("PAPARAZZI_HOME", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../../'))) +sys.path.append(PPRZ_HOME + "/var/lib/python") # pprzlink from pprzlink.ivy import IvyMessagesInterface from pprzlink.message import PprzMessage diff --git a/sw/ground_segment/python/move_waypoint_example.py b/sw/ground_segment/python/move_waypoint_example.py index d484881b7d..bd8574aee0 100755 --- a/sw/ground_segment/python/move_waypoint_example.py +++ b/sw/ground_segment/python/move_waypoint_example.py @@ -6,10 +6,10 @@ import sys from os import path, getenv from time import sleep -# if PAPARAZZI_SRC not set, then assume the tree containing this +# if PAPARAZZI_HOME 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/ext/pprzlink/lib/v1.0/python") +PPRZ_HOME = getenv("PAPARAZZI_HOME", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../'))) +sys.path.append(PPRZ_HOME + "/var/lib/python") from pprzlink.ivy import IvyMessagesInterface from pprzlink.message import PprzMessage diff --git a/sw/ground_segment/python/natnet3.x/natnet2ivy.py b/sw/ground_segment/python/natnet3.x/natnet2ivy.py index 401053eaec..099624b5df 100755 --- a/sw/ground_segment/python/natnet3.x/natnet2ivy.py +++ b/sw/ground_segment/python/natnet3.x/natnet2ivy.py @@ -54,7 +54,6 @@ from NatNetClient import NatNetClient # file is a reasonable substitute PPRZ_HOME = getenv("PAPARAZZI_HOME", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../../'))) sys.path.append(PPRZ_HOME + "/var/lib/python") -sys.path.append(PPRZ_HOME + "/var/lib/python/pprzlink") # seems needed for messages_xml_map file from pprzlink.ivy import IvyMessagesInterface from pprzlink.message import PprzMessage diff --git a/sw/ground_segment/python/payload_forward/payload_forward.py b/sw/ground_segment/python/payload_forward/payload_forward.py index 44a583f531..7ae9296ea0 100644 --- a/sw/ground_segment/python/payload_forward/payload_forward.py +++ b/sw/ground_segment/python/payload_forward/payload_forward.py @@ -27,9 +27,9 @@ import jpeg100_decoder from cStringIO import StringIO -PPRZ_SRC = os.getenv("PAPARAZZI_SRC", os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../../..'))) +PPRZ_HOME = os.getenv("PAPARAZZI_HOME", os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../../..'))) -sys.path.append(PPRZ_SRC + "/sw/ext/pprzlink/lib/v1.0/python") +sys.path.append(PPRZ_HOME + "/var/lib/python") from pprzlink.ivy import IvyMessagesInterface diff --git a/sw/ground_segment/python/real_time_plot/messagepicker.py b/sw/ground_segment/python/real_time_plot/messagepicker.py index bb2a0c6089..4fe9143d29 100755 --- a/sw/ground_segment/python/real_time_plot/messagepicker.py +++ b/sw/ground_segment/python/real_time_plot/messagepicker.py @@ -7,10 +7,10 @@ import sys import time from os import path, getenv -# if PAPARAZZI_SRC not set, then assume the tree containing this +# if PAPARAZZI_HOME 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/ext/pprzlink/lib/v1.0/python") +PPRZ_HOME = getenv("PAPARAZZI_HOME", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../../'))) +sys.path.append(PPRZ_HOME + "/var/lib/python") from pprzlink.ivy import IvyMessagesInterface from pprzlink.message import PprzMessage diff --git a/sw/ground_segment/python/real_time_plot/plotpanel.py b/sw/ground_segment/python/real_time_plot/plotpanel.py index 7842a2bd7f..871f4c0d39 100644 --- a/sw/ground_segment/python/real_time_plot/plotpanel.py +++ b/sw/ground_segment/python/real_time_plot/plotpanel.py @@ -11,11 +11,12 @@ import sys from os import getenv, path import messagepicker -# if PAPARAZZI_SRC not set, then assume the tree containing this +# if PAPARAZZI_SRC or PAPARAZZI_HOME not set, then assume the tree containing this # file is a reasonable substitute +PPRZ_HOME = getenv("PAPARAZZI_HOME", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../../'))) PPRZ_SRC = getenv("PAPARAZZI_SRC", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../../'))) sys.path.append(PPRZ_SRC + "/sw/lib/python") -sys.path.append(PPRZ_SRC + "/sw/ext/pprzlink/lib/v1.0/python") +sys.path.append(PPRZ_HOME + "/var/lib/python") # pprzlink import pprz_env from pprzlink import messages_xml_map diff --git a/sw/ground_segment/python/redundant_link/link_combiner.py b/sw/ground_segment/python/redundant_link/link_combiner.py index 6f850b61b1..142bef5cff 100755 --- a/sw/ground_segment/python/redundant_link/link_combiner.py +++ b/sw/ground_segment/python/redundant_link/link_combiner.py @@ -30,8 +30,9 @@ import argparse from ivy.std_api import * PPRZ_HOME = os.getenv("PAPARAZZI_HOME") -sys.path.append(PPRZ_HOME + "/sw/lib/python") -sys.path.append(PPRZ_HOME + "/sw/ext/pprzlink/lib/v1.0/python") +PPRZ_SRC = os.getenv("PAPARAZZI_SRC") +sys.path.append(PPRZ_SRC + "/sw/lib/python") +sys.path.append(PPRZ_HOME + "/var/lib/python") import pprz_env from pprzlink import messages_xml_map diff --git a/sw/ground_segment/python/svinfo/svinfoviewer.py b/sw/ground_segment/python/svinfo/svinfoviewer.py index 0788df5e2d..8c89db00e7 100644 --- a/sw/ground_segment/python/svinfo/svinfoviewer.py +++ b/sw/ground_segment/python/svinfo/svinfoviewer.py @@ -23,10 +23,10 @@ import sys import os import math -PPRZ_SRC = os.getenv("PAPARAZZI_SRC", os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), +PPRZ_HOME = os.getenv("PAPARAZZI_HOME", os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../../..'))) -sys.path.append(PPRZ_SRC + "/sw/ext/pprzlink/lib/v1.0/python") +sys.path.append(PPRZ_HOME + "/var/lib/python") from pprzlink.ivy import IvyMessagesInterface diff --git a/sw/simulator/mesonh/mesonh.py b/sw/simulator/mesonh/mesonh.py index 3f9dd008c9..1e2c8ad271 100755 --- a/sw/simulator/mesonh/mesonh.py +++ b/sw/simulator/mesonh/mesonh.py @@ -9,10 +9,10 @@ import struct import cmath import numpy as np from os import getenv -# if PAPARAZZI_SRC not set, then assume the tree containing this +# if PAPARAZZI_HOME not set, then assume the tree containing this # file is a reasonable substitute -PPRZ_SRC = getenv("PAPARAZZI_SRC", os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../../'))) -sys.path.append(PPRZ_SRC + "/sw/ext/pprzlink/lib/v1.0/python") +PPRZ_HOME = getenv("PAPARAZZI_HOME", os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../../'))) +sys.path.append(PPRZ_HOME + "/var/lib/python") from pprzlink.ivy import IvyMessagesInterface from pprzlink.message import PprzMessage diff --git a/sw/tools/calibration/calib_mag_live.py b/sw/tools/calibration/calib_mag_live.py index 2cf10b7e7c..af84e1ab1b 100755 --- a/sw/tools/calibration/calib_mag_live.py +++ b/sw/tools/calibration/calib_mag_live.py @@ -7,13 +7,10 @@ import logging import sys from os import path, getenv -# if PAPARAZZI_SRC not set, then assume the tree containing this +# if PAPARAZZI_HOME 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") -sys.path.append(PPRZ_SRC + "/sw/ext/pprzlink/lib/v1.0/python") - -PPRZ_HOME = getenv("PAPARAZZI_HOME", PPRZ_SRC) +PPRZ_HOME = getenv("PAPARAZZI_HOME", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../'))) +sys.path.append(PPRZ_HOME + "/var/lib/python") # pprzlink from pprzlink.ivy import IvyMessagesInterface diff --git a/sw/tools/rtp_viewer/rtp_viewer.py b/sw/tools/rtp_viewer/rtp_viewer.py index a6067c124e..92025d49f4 100755 --- a/sw/tools/rtp_viewer/rtp_viewer.py +++ b/sw/tools/rtp_viewer/rtp_viewer.py @@ -5,8 +5,10 @@ import sys import argparse from os import path, getenv -PPRZ_SRC = getenv("PAPARAZZI_SRC", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../'))) -sys.path.append(PPRZ_SRC + "/sw/ext/pprzlink/lib/v1.0/python") +# if PAPARAZZI_HOME not set, then assume the tree containing this +# file is a reasonable substitute +PPRZ_HOME = getenv("PAPARAZZI_HOME", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../'))) +sys.path.append(PPRZ_HOME + "/var/lib/python") # pprzlink from pprzlink.ivy import IvyMessagesInterface from pprzlink.message import PprzMessage