Files
paparazzi/sw/lib/python/pprz_env.py
T
Felix Ruess 34e076e2f7 [python] add pprz_env with usable default IVY_BUS
- pprz_env.IVY_BUS is either the env variable IVY_BUS or appropriate default (checks for OSX)
- some fixes for udp_link

should fix #1495 and the python part of #204
2015-12-22 11:50:47 +01:00

14 lines
460 B
Python

import os
import platform
PAPARAZZI_SRC = os.getenv("PAPARAZZI_SRC", os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)),
'../../..')))
PAPARAZZI_HOME = os.getenv("PAPARAZZI_HOME", PAPARAZZI_SRC)
if os.getenv('IVY_BUS') is not None:
IVY_BUS = os.getenv('IVY_BUS')
elif platform.system() == 'Darwin':
IVY_BUS = "224.255.255.255:2010"
else:
IVY_BUS = ""