Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pprz] change the old paparazzi launch script from ocaml to python #2467

Merged
merged 1 commit into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ paparazzi.sublime-workspace
/var
/dox

/paparazzi

# /conf/
/conf/conf.xml
/conf/conf.xml.20*
Expand Down
16 changes: 3 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ conf/%.xml :conf/%_example.xml
conf/tools/blacklisted: conf/tools/blacklisted_example
cp conf/tools/blacklisted_example conf/tools/blacklisted

ground_segment: _print_building update_google_version conf libpprz subdirs commands static
ground_segment: _print_building update_google_version conf libpprz subdirs static
ground_segment.opt: ground_segment cockpit.opt tmtc.opt

static: cockpit tmtc generators sim_static joystick static_h
Expand Down Expand Up @@ -246,20 +246,10 @@ ac_h ac fbw ap: static conf generators ext
sim: sim_static


#
# Commands
#

# stuff to build and upload the lpc bootloader ...
include Makefile.lpctools
lpctools: lpc21iap

commands: paparazzi

paparazzi:
cat src/paparazzi | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
chmod a+x $@


#
# doxygen html documentation
Expand All @@ -276,7 +266,7 @@ dox:
#

clean:
$(Q)rm -fr dox build-stamp configure-stamp conf/%gconf.xml paparazzi
$(Q)rm -fr dox build-stamp configure-stamp conf/%gconf.xml
$(Q)rm -f $(GEN_HEADERS)
$(Q)MESSAGES_INSTALL=$(MESSAGES_INSTALL) $(MAKE) -C $(PPRZLINK_DIR) uninstall
$(Q)rm -fr $(MAVLINK_DIR)
Expand Down Expand Up @@ -348,6 +338,6 @@ test_sim: all

.PHONY: all print_build_version _print_building _save_build_version update_google_version init dox ground_segment ground_segment.opt \
subdirs $(SUBDIRS) conf ext libpprz libpprzlink cockpit cockpit.opt tmtc tmtc.opt generators\
static sim_static lpctools commands opencv_bebop\
static sim_static lpctools opencv_bebop\
clean cleanspaces ab_clean dist_clean distclean dist_clean_irreversible \
test test_examples test_math test_sim test_all_confs
21 changes: 21 additions & 0 deletions paparazzi
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env /usr/bin/python3

import os
import sys

dirname = os.path.dirname(os.path.abspath(__file__))
PAPARAZZI_HOME = os.getenv("PAPARAZZI_HOME",dirname)
PAPARAZZI_SRC = os.getenv("PAPARAZZI_SRC",PAPARAZZI_HOME)
env = os.environ
env['PAPARAZZI_HOME'] = PAPARAZZI_HOME
env['PAPARAZZI_SRC'] = PAPARAZZI_SRC

if len(sys.argv) > 1 and sys.argv[1] == "-python":
path = os.path.normpath(os.path.join(dirname, 'sw', 'supervision', 'python', 'main.py'))
args = sys.argv[2:]
os.execve(path, args, env)
else:
path = os.path.normpath(os.path.join(dirname, 'sw', 'supervision', 'paparazzicenter'))
args = sys.argv[1:]
os.execve(path, args, env)

24 changes: 0 additions & 24 deletions src/paparazzi

This file was deleted.