mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-26 08:22:43 +08:00
Updating gvfFormation.py (#2094)
* compatible with pprzlink 1 and 2. Msgs do not need to be split anymore * PAPARAZZI_HOME and SRC employed correctly * PPRZ_SRC is now set correctly
This commit is contained in:
committed by
Gautier Hattenberger
parent
42ff496e2c
commit
b44fcdc497
@@ -7,9 +7,10 @@ import wx
|
||||
import numpy as np
|
||||
import sys
|
||||
from os import path, getenv
|
||||
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")
|
||||
from pprzlink.ivy import IvyMessagesInterface
|
||||
from pprzlink.message import PprzMessage
|
||||
from settings_xml_parse import PaparazziACSettings
|
||||
@@ -45,7 +46,7 @@ def message_recv(ac_id, msg):
|
||||
|
||||
if msg.name == 'GVF':
|
||||
if int(msg.get_field(1)) == 1:
|
||||
param = msg.get_field(4).split(',')
|
||||
param = msg.get_field(4)
|
||||
ac.XYc[0] = float(param[0])
|
||||
ac.XYc[1] = float(param[1])
|
||||
ac.a = float(param[2])
|
||||
|
||||
Reference in New Issue
Block a user