mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
ocaml applications -> dynamic compil and link
"make deb" creates a valid (???) deb package paparazzi_demo to play s simple example
This commit is contained in:
@@ -114,13 +114,13 @@ clean_ac :
|
|||||||
rm -fr $(PAPARAZZI_HOME)/var/$(AIRCRAFT)
|
rm -fr $(PAPARAZZI_HOME)/var/$(AIRCRAFT)
|
||||||
|
|
||||||
run_sitl :
|
run_sitl :
|
||||||
$(PAPARAZZI_HOME)/var/$(AIRCRAFT)/sim/simsitl.out
|
$(PAPARAZZI_HOME)/var/$(AIRCRAFT)/sim/simsitl
|
||||||
|
|
||||||
install : all
|
install :
|
||||||
./Makefile.pl -install -destdir $(DESTDIR)
|
./Makefile.pl -install -destdir $(DESTDIR)/usr
|
||||||
|
|
||||||
uninstall :
|
uninstall :
|
||||||
./Makefile.pl -uninstall -destdir $(DESTDIR)
|
./Makefile.pl -uninstall -destdir $(DESTDIR)/usr
|
||||||
|
|
||||||
deb :
|
deb :
|
||||||
chmod u+x debian/rules
|
chmod u+x debian/rules
|
||||||
|
|||||||
+2
-2
@@ -1,11 +1,11 @@
|
|||||||
DESTDIR=/usr
|
DESTDIR=/
|
||||||
|
|
||||||
ifeq ($(PAPARAZZI_HOME),)
|
ifeq ($(PAPARAZZI_HOME),)
|
||||||
PAPARAZZI_HOME=$(HOME)/paparazzi
|
PAPARAZZI_HOME=$(HOME)/paparazzi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PAPARAZZI_SRC),)
|
ifeq ($(PAPARAZZI_SRC),)
|
||||||
TOOLS=$(DESTDIR)/share/paparazzi/bin
|
TOOLS=$(DESTDIR)/usr/share/paparazzi/bin
|
||||||
else
|
else
|
||||||
TOOLS=$(PAPARAZZI_SRC)/sw/tools
|
TOOLS=$(PAPARAZZI_SRC)/sw/tools
|
||||||
endif
|
endif
|
||||||
|
|||||||
+67
-20
@@ -2,19 +2,20 @@
|
|||||||
|
|
||||||
<section name="binaries" dest="bin" comment="main program">
|
<section name="binaries" dest="bin" comment="main program">
|
||||||
<file name="sw/supervision/paparazzi.pl"/>
|
<file name="sw/supervision/paparazzi.pl"/>
|
||||||
|
<!-- TMP --> <file name="paparazzi_demo"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="priv_binaries" dest="share/paparazzi/bin" comment="helpers program">
|
<section name="priv_binaries" dest="share/paparazzi/bin" comment="helpers program">
|
||||||
<file name="sw/configurator/medit.out"/>
|
<file name="sw/configurator/medit.out"/>
|
||||||
<file name="sw/ground_segment/cockpit/cockpit.pl"/>
|
<file name="sw/ground_segment/cockpit/cockpit.pl"/>
|
||||||
<file name="sw/ground_segment/cockpit/map.pl"/>
|
<file name="sw/ground_segment/cockpit/map.pl"/>
|
||||||
<file name="sw/ground_segment/cockpit/map2d.opt"/>
|
<file name="sw/ground_segment/cockpit/map2d"/>
|
||||||
<file name="sw/ground_segment/speech/paparazzi_speak.pl"/>
|
<file name="sw/ground_segment/speech/paparazzi_speak.pl"/>
|
||||||
<file name="sw/ground_segment/tmtc/messages.opt"/>
|
<file name="sw/ground_segment/tmtc/messages"/>
|
||||||
<file name="sw/ground_segment/tmtc/receive.opt"/>
|
<file name="sw/ground_segment/tmtc/receive"/>
|
||||||
<file name="sw/ground_segment/visu3d/mapGL.opt"/>
|
<file name="sw/ground_segment/visu3d/mapGL"/>
|
||||||
<file name="sw/logalizer/play.opt"/>
|
<file name="sw/logalizer/play"/>
|
||||||
<file name="sw/simulator/gen_downlink.out"/>
|
<file name="sw/simulator/gen_downlink"/>
|
||||||
<file name="sw/simulator/simsitl.pl"/>
|
<file name="sw/simulator/simsitl.pl"/>
|
||||||
<file name="sw/tools/gen_aircraft.out"/>
|
<file name="sw/tools/gen_aircraft.out"/>
|
||||||
<file name="sw/tools/gen_airframe.out"/>
|
<file name="sw/tools/gen_airframe.out"/>
|
||||||
@@ -66,7 +67,7 @@
|
|||||||
<file name="conf/ubx.dtd"/>
|
<file name="conf/ubx.dtd"/>
|
||||||
<file name="conf/conf.xml"/>
|
<file name="conf/conf.xml"/>
|
||||||
<file name="conf/control_panel.xml.sys" new_name="control_panel.xml"/>
|
<file name="conf/control_panel.xml.sys" new_name="control_panel.xml"/>
|
||||||
<file name="conf/ground_segment.xml"/>
|
<!-- <file name="conf/ground_segment.xml"/> -->
|
||||||
<file name="conf/hosts_wavecard.xml"/>
|
<file name="conf/hosts_wavecard.xml"/>
|
||||||
<file name="conf/messages.xml"/>
|
<file name="conf/messages.xml"/>
|
||||||
<file name="conf/wavecard.xml"/>
|
<file name="conf/wavecard.xml"/>
|
||||||
@@ -119,17 +120,64 @@
|
|||||||
<file name="Makefile.ac"/>
|
<file name="Makefile.ac"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section name="sw_tmtc" dest="share/paparazzi/sw/ground_segment/tmtc" comment="ocaml objects">
|
||||||
|
<file name="sw/ground_segment/tmtc/modem.cmo"/>
|
||||||
|
<file name="sw/ground_segment/tmtc/modem.cmi"/>
|
||||||
|
<file name="sw/ground_segment/tmtc/receive.ml"/>
|
||||||
|
<file name="sw/ground_segment/tmtc/messages.ml"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section name="sw_cockpit" dest="share/paparazzi/sw/ground_segment/cockpit" comment="ocaml objects">
|
||||||
|
<file name="sw/ground_segment/cockpit/map2d.ml"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section name="sw_visu3d" dest="share/paparazzi/sw/ground_segment/visu3d" comment="ocaml objects">
|
||||||
|
<file name="sw/ground_segment/visu3d/mapGL.ml"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section name="sw_log" dest="share/paparazzi/sw/logalizer" comment="ocaml objects">
|
||||||
|
<file name="sw/logalizer/play.ml"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section name="sw_tools" dest="share/paparazzi/sw/tools" comment="ocaml objects">
|
||||||
|
<file name="sw/tools/gen_aircraft.ml"/>
|
||||||
|
<file name="sw/tools/gen_airframe.ml"/>
|
||||||
|
<file name="sw/tools/gen_calib.ml"/>
|
||||||
|
<file name="sw/tools/gen_radio.ml"/>
|
||||||
|
<file name="sw/tools/gen_ubx.ml"/>
|
||||||
|
<file name="sw/tools/gen_messages.ml"/>
|
||||||
|
<file name="sw/tools/gen_flight_plan.ml"/>
|
||||||
|
<file name="sw/tools/fp_syntax.cmo"/>
|
||||||
|
<file name="sw/tools/fp_parser.cmo"/>
|
||||||
|
<file name="sw/tools/fp_lexer.cmo"/>
|
||||||
|
<file name="sw/tools/fp_proc.cmo"/>
|
||||||
|
<file name="sw/tools/fp_proc.cmi"/>
|
||||||
|
<file name="sw/tools/fp_syntax.cmi"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section name="sw_lib_ocaml" dest="share/paparazzi/sw/lib/ocaml" comment="ocaml objects and libs needed during airborne code generation">
|
<section name="sw_lib_ocaml" dest="share/paparazzi/sw/lib/ocaml" comment="ocaml objects and libs needed during airborne code generation">
|
||||||
<file name="sw/lib/ocaml/env.cmo"/>
|
|
||||||
<file name="sw/lib/ocaml/env.cmi"/>
|
<file name="sw/lib/ocaml/env.cmi"/>
|
||||||
<file name="sw/lib/ocaml/extXml.cmo"/>
|
|
||||||
<file name="sw/lib/ocaml/extXml.cmi"/>
|
<file name="sw/lib/ocaml/extXml.cmi"/>
|
||||||
<file name="sw/lib/ocaml/latlong.cmo"/>
|
|
||||||
<file name="sw/lib/ocaml/latlong.cmi"/>
|
<file name="sw/lib/ocaml/latlong.cmi"/>
|
||||||
<file name="sw/lib/ocaml/xml2h.cmo"/>
|
|
||||||
<file name="sw/lib/ocaml/xml2h.cmi"/>
|
<file name="sw/lib/ocaml/xml2h.cmi"/>
|
||||||
<file name="sw/lib/ocaml/lib.cma"/>
|
<file name="sw/lib/ocaml/serial.cmi"/>
|
||||||
<file name="sw/lib/ocaml/liblib.a"/>
|
<file name="sw/lib/ocaml/pprz.cmi"/>
|
||||||
|
<file name="sw/lib/ocaml/debug.cmi"/>
|
||||||
|
<file name="sw/lib/ocaml/geometry_2d.cmi"/>
|
||||||
|
<file name="sw/lib/ocaml/geometry_3d.cmi"/>
|
||||||
|
<file name="sw/lib/ocaml/gtk_3d.cmi"/>
|
||||||
|
<file name="sw/lib/ocaml/gtk_tools.cmi"/>
|
||||||
|
<file name="sw/lib/ocaml/srtm.cmi"/>
|
||||||
|
<file name="sw/lib/ocaml/ocaml_tools.cmi"/>
|
||||||
|
<file name="sw/lib/ocaml/mapCanvas.cmi"/>
|
||||||
|
<file name="sw/lib/ocaml/mapTrack.cmi"/>
|
||||||
|
<file name="sw/lib/ocaml/mapWaypoints.cmi"/>
|
||||||
|
<file name="sw/lib/ocaml/lib-pprz.cma"/>
|
||||||
|
<file name="sw/lib/ocaml/liblib-pprz.a"/>
|
||||||
|
<file name="sw/lib/ocaml/dlllib-pprz.so"/>
|
||||||
|
<file name="sw/lib/ocaml/xlib-pprz.cma"/>
|
||||||
|
<file name="sw/lib/ocaml/libxlib-pprz.a"/>
|
||||||
|
<file name="sw/lib/ocaml/dllxlib-pprz.so"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="sw_simulator" dest="share/paparazzi/sw/simulator" comment="ocaml objects and C hooks for airborne code simulation">
|
<section name="sw_simulator" dest="share/paparazzi/sw/simulator" comment="ocaml objects and C hooks for airborne code simulation">
|
||||||
@@ -139,13 +187,11 @@
|
|||||||
<file name="sw/simulator/flightModel.ml"/>
|
<file name="sw/simulator/flightModel.ml"/>
|
||||||
<file name="sw/simulator/flightModel.mli"/>
|
<file name="sw/simulator/flightModel.mli"/>
|
||||||
<file name="sw/simulator/flightModelHeli.ml.sav"/>
|
<file name="sw/simulator/flightModelHeli.ml.sav"/>
|
||||||
<file name="sw/simulator/gen_downlink.ml"/>
|
|
||||||
<file name="sw/simulator/gps.ml"/>
|
<file name="sw/simulator/gps.ml"/>
|
||||||
<file name="sw/simulator/gui.ml"/>
|
<file name="sw/simulator/gui.ml"/>
|
||||||
<file name="sw/simulator/hitl.ml"/>
|
<file name="sw/simulator/hitl.ml"/>
|
||||||
<file name="sw/simulator/hitl.mli"/>
|
<file name="sw/simulator/hitl.mli"/>
|
||||||
<file name="sw/simulator/sim.ml"/>
|
<file name="sw/simulator/sim.cmi"/>
|
||||||
<file name="sw/simulator/sim.mli"/>
|
|
||||||
<file name="sw/simulator/sim_ap.c"/>
|
<file name="sw/simulator/sim_ap.c"/>
|
||||||
<file name="sw/simulator/sim_gps.c"/>
|
<file name="sw/simulator/sim_gps.c"/>
|
||||||
<file name="sw/simulator/sim_ir.c"/>
|
<file name="sw/simulator/sim_ir.c"/>
|
||||||
@@ -153,11 +199,12 @@
|
|||||||
<file name="sw/simulator/simsitl.ml"/>
|
<file name="sw/simulator/simsitl.ml"/>
|
||||||
<file name="sw/simulator/simsitl.pl"/>
|
<file name="sw/simulator/simsitl.pl"/>
|
||||||
<file name="sw/simulator/sirf.ml"/>
|
<file name="sw/simulator/sirf.ml"/>
|
||||||
<file name="sw/simulator/sitl.ml"/>
|
<file name="sw/simulator/sitl.cma"/>
|
||||||
<file name="sw/simulator/sitl.mli"/>
|
<file name="sw/simulator/sitl.cmi"/>
|
||||||
<file name="sw/simulator/stdlib.ml"/>
|
<file name="sw/simulator/stdlib.ml"/>
|
||||||
<file name="sw/simulator/timer.h"/>
|
<file name="sw/simulator/timer.h"/>
|
||||||
<file name="sw/simulator/types.ml"/>
|
<file name="sw/simulator/types.ml"/>
|
||||||
|
<file name="sw/simulator/gen_downlink.ml"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="sw_include" dest="share/paparazzi/sw/include" comment="common headers for airborne code">
|
<section name="sw_include" dest="share/paparazzi/sw/include" comment="common headers for airborne code">
|
||||||
@@ -224,11 +271,11 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="var_Thon1_sim" dest="share/paparazzi/var/Thon1/sim">
|
<section name="var_Thon1_sim" dest="share/paparazzi/var/Thon1/sim">
|
||||||
<file name="var/Thon1/sim/simsitl.out"/>
|
<file name="var/Thon1/sim/simsitl"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="var_Thon2_sim" dest="share/paparazzi/var/Thon2/sim">
|
<section name="var_Thon2_sim" dest="share/paparazzi/var/Thon2/sim">
|
||||||
<file name="var/Thon2/sim/simsitl.out"/>
|
<file name="var/Thon2/sim/simsitl"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</install>
|
</install>
|
||||||
|
|||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
4
|
||||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 4.0.0)
|
|||||||
Standards-Version: 3.6.1
|
Standards-Version: 3.6.1
|
||||||
|
|
||||||
Package: paparazzi
|
Package: paparazzi
|
||||||
Architecture: any
|
Architecture: i386
|
||||||
Depends: ivy-c-dev, ivy-c, ivy-perl, libsubject-perl, zinc-perl, zinc-tk, ivy-ocaml, xml-light-ocaml, libxml-dom-perl, libpcre3-dev, liblablgtk2-ocaml-dev, gcc-avr, avr-libc, binutils-avr, libexpect-perl, libgnomecanvas2-dev, libcamlimages-ocaml-dev, uisp, libfile-ncopy-perl, libtext-csv-perl, digikit
|
Depends: ivy-c-dev, ivy-c, ivy-perl, libsubject-perl, zinc-perl, zinc-tk, ivy-ocaml, xml-light-ocaml, libxml-dom-perl, libpcre3-dev, liblablgtk2-ocaml-dev, gcc-avr, avr-libc, binutils-avr, libexpect-perl, libgnomecanvas2-dev, libcamlimages-ocaml-dev, uisp, libfile-ncopy-perl, libtext-csv-perl, digikit
|
||||||
Description: Paparazzi Meta Package
|
Description: Paparazzi Meta Package
|
||||||
|
|
||||||
|
|||||||
Vendored
+5
-5
@@ -34,8 +34,8 @@ build-stamp: configure-stamp
|
|||||||
dh_testdir
|
dh_testdir
|
||||||
|
|
||||||
# Add here commands to compile the package.
|
# Add here commands to compile the package.
|
||||||
# $(MAKE)
|
$(MAKE)
|
||||||
#docbook-to-man debian/paparazzi.sgml > paparazzi.1
|
#docbook-to-man debian/ivy-ocaml.sgml > ivy-ocaml.1
|
||||||
|
|
||||||
touch build-stamp
|
touch build-stamp
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ clean:
|
|||||||
rm -f build-stamp configure-stamp
|
rm -f build-stamp configure-stamp
|
||||||
|
|
||||||
# Add here commands to clean up after the build process.
|
# Add here commands to clean up after the build process.
|
||||||
# -$(MAKE) clean
|
-$(MAKE) clean
|
||||||
|
|
||||||
dh_clean
|
dh_clean
|
||||||
|
|
||||||
@@ -55,8 +55,8 @@ install: build
|
|||||||
dh_clean -k
|
dh_clean -k
|
||||||
dh_installdirs
|
dh_installdirs
|
||||||
|
|
||||||
# Add here commands to install the package into debian/paparazzi.
|
# Add here commands to install the package into debian/ivy-ocaml.
|
||||||
# $(MAKE) install DESTDIR=$(CURDIR)/debian/paparazzi
|
$(MAKE) install DESTDIR=$(CURDIR)/debian/paparazzi
|
||||||
|
|
||||||
|
|
||||||
# Build architecture-independent files here.
|
# Build architecture-independent files here.
|
||||||
|
|||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
mkdir -p $HOME/paparazzi
|
||||||
|
cp -a /usr/share/paparazzi/var $HOME/paparazzi
|
||||||
|
cp -a /usr/share/paparazzi/conf $HOME/paparazzi
|
||||||
|
cp -a /usr/share/paparazzi/data $HOME/paparazzi
|
||||||
|
PATH=$PATH:/usr/share/paparazzi/bin
|
||||||
|
cockpit.pl &
|
||||||
|
sleep 1
|
||||||
|
map2d -m muret_UTM.xml &
|
||||||
|
sleep 1
|
||||||
|
$HOME/paparazzi/var/Thon1/sim/simsitl &
|
||||||
|
sleep 1
|
||||||
|
$HOME/paparazzi/var/Thon2/sim/simsitl &
|
||||||
|
sleep 1
|
||||||
|
receive
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
if test -z "$PAPARAZZI_SRC"; then
|
||||||
|
PAPARAZZI_SRC=/usr/share/paparazzi
|
||||||
|
fi
|
||||||
@@ -23,16 +23,25 @@
|
|||||||
OCAMLC=ocamlc -g -I +labltk -I +lablgtk2 -I ../lib/ocaml
|
OCAMLC=ocamlc -g -I +labltk -I +lablgtk2 -I ../lib/ocaml
|
||||||
|
|
||||||
|
|
||||||
SRC = env_conf.ml notebook.ml tty.ml varXml.ml console.ml tkXml.ml flasher.ml welcome.ml hardware.ml radio.ml servos.ml adc.ml infrared.ml attitude.ml autopilot.ml airframe.ml flightplan.ml upload.ml simulator.ml monitor.ml logalizer.ml main.ml
|
CMO = env_conf.cmo notebook.cmo tty.cmo varXml.cmo console.cmo tkXml.cmo flasher.cmo welcome.cmo hardware.cmo radio.cmo servos.cmo adc.cmo infrared.cmo attitude.cmo autopilot.cmo airframe.cmo flightplan.cmo upload.cmo simulator.cmo monitor.cmo logalizer.cmo main.ml
|
||||||
CMO = $(SRC:.ml=.cmo)
|
|
||||||
|
|
||||||
all : configurator medit.out
|
ABS_CMO = $(CMO:%=$$PAPARAZZI_SRC/sw/configurator/%)
|
||||||
|
|
||||||
|
all : configurator medit
|
||||||
|
|
||||||
configurator : $(CMO)
|
configurator : $(CMO)
|
||||||
$(OCAMLC) -custom -o $@ unix.cma str.cma xml-light.cma labltk.cma jpflib.cma lib.cma $^
|
$(OCAMLC) -custom -o /dev/null unix.cma str.cma xml-light.cma labltk.cma jpflib.cma lib-pprz.cma $^ # To check
|
||||||
|
cat ../../pprz_src_test.sh > $@
|
||||||
|
echo 'ocaml -I +labltk -I $$PAPARAZZI_SRC/sw/lib/ocaml -I $$PAPARAZZI_SRC/sw/configurator unix.cma str.cma xml-light.cma labltk.cma jpflib.cma lib-pprz.cma $(ABS_CMO) $$*' >> $@
|
||||||
|
chmod a+x $@
|
||||||
|
|
||||||
|
medit : medit.ml
|
||||||
|
$(OCAMLC) -o /dev/null str.cma unix.cma xml-light.cma glibivy-ocaml.cma -I +lablgtk2 lablgtk.cma lablgnomecanvas.cma gtkInit.cmo lib-pprz.cma $^ # To check
|
||||||
|
cat ../../pprz_src_test.sh > $@
|
||||||
|
echo 'lablgtk2 -I $$PAPARAZZI_SRC/sw/lib/ocaml str.cma unix.cma xml-light.cma glibivy-ocaml.cma lib-pprz.cma $$PAPARAZZI_SRC/sw/configurator/$< $$*' >> $@
|
||||||
|
chmod a+x $@
|
||||||
|
|
||||||
|
|
||||||
medit.out : medit.cmo
|
|
||||||
$(OCAMLC) -o $@ str.cma unix.cma xml-light.cma glibivy-ocaml.cma -I +lablgtk2 lablgtk.cma lablgnomecanvas.cma gtkInit.cmo lib.cma $^
|
|
||||||
|
|
||||||
%.cmo : %.ml
|
%.cmo : %.ml
|
||||||
$(OCAMLC) -c $<
|
$(OCAMLC) -c $<
|
||||||
|
|||||||
@@ -1,25 +1,18 @@
|
|||||||
OCAMLC=ocamlc -g
|
OCAMLC=ocamlc -g
|
||||||
OCAMLOPT=ocamlopt
|
OCAMLOPT=ocamlopt
|
||||||
INCLUDES=-I +lablgtk2 -I +camlimages -I ../../lib/ocaml
|
INCLUDES=-I +lablgtk2 -I +camlimages -I ../../lib/ocaml
|
||||||
LIBS=glibivy-ocaml.cma lablgtk.cma ci_core.cma ci_png.cma ci_gif.cma ci_jpeg.cma ci_tiff.cma ci_bmp.cma ci_ppm.cma ci_ps.cma lib.cma lablgnomecanvas.cma xlib.cma
|
LIBS=glibivy-ocaml.cma lablgtk.cma ci_core.cma ci_png.cma ci_gif.cma ci_jpeg.cma ci_tiff.cma ci_bmp.cma ci_ppm.cma ci_ps.cma lib-pprz.cma lablgnomecanvas.cma xlib-pprz.cma
|
||||||
CMXA=$(LIBS:.cma=.cmxa)
|
CMXA=$(LIBS:.cma=.cmxa)
|
||||||
|
|
||||||
SRC = map2d.ml
|
|
||||||
CMO = $(SRC:.ml=.cmo)
|
|
||||||
CMX = $(SRC:.ml=.cmx)
|
|
||||||
|
|
||||||
all : map2d.opt
|
all : map2d
|
||||||
|
|
||||||
|
|
||||||
map2d.out : $(CMO)
|
map2d : map2d.ml
|
||||||
$(OCAMLC) $(INCLUDES) $(LIBS) gtkInit.cmo $(CMO) -o $@
|
$(OCAMLC) -custom $(INCLUDES) $(LIBS) gtkInit.cmo $(CMO) -o /dev/null #to Check
|
||||||
|
cat ../../../pprz_src_test.sh > $@
|
||||||
|
echo 'lablgtk2 str.cma unix.cma xml-light.cma -I +camlimages glibivy-ocaml.cma ci_core.cma ci_png.cma ci_gif.cma ci_jpeg.cma ci_tiff.cma ci_bmp.cma ci_ppm.cma ci_ps.cma -I $$PAPARAZZI_SRC/sw/lib/ocaml lib-pprz.cma xlib-pprz.cma $$PAPARAZZI_SRC/sw/ground_segment/cockpit/$< $$*' >> $@
|
||||||
map2d.opt : $(CMX)
|
chmod a+x $@
|
||||||
$(OCAMLOPT) str.cmxa unix.cmxa xml-light.cmxa $(INCLUDES) $(CMXA) gtkInit.cmx $(CMX) -o $@
|
|
||||||
|
|
||||||
map2d.run:
|
|
||||||
lablgtk2 str.cma unix.cma xml-light.cma -I +camlimages -I ../../lib/ocaml glibivy-ocaml.cma ci_core.cma ci_png.cma ci_gif.cma ci_jpeg.cma ci_tiff.cma ci_bmp.cma ci_ppm.cma ci_ps.cma lib.cma xlib.cma map2d.ml
|
|
||||||
|
|
||||||
|
|
||||||
.SUFFIXES: .ml .mli .cmo .cmi .cmx
|
.SUFFIXES: .ml .mli .cmo .cmi .cmx
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ let gen_flight_plan =
|
|||||||
try
|
try
|
||||||
Sys.getenv "PAPARAZZI_SRC" // "sw/tools/gen_flight_plan.out"
|
Sys.getenv "PAPARAZZI_SRC" // "sw/tools/gen_flight_plan.out"
|
||||||
with
|
with
|
||||||
Not_found -> "/usr/bin/paparazzi gen_flight_plan"
|
Not_found -> "/usr/share/paparazzi/bin/gen_flight_plan.out"
|
||||||
|
|
||||||
|
|
||||||
type aircraft = {
|
type aircraft = {
|
||||||
|
|||||||
@@ -22,37 +22,32 @@
|
|||||||
|
|
||||||
include ../../../conf/Makefile.local
|
include ../../../conf/Makefile.local
|
||||||
|
|
||||||
all: messages.cmo modem.cmo receive.cmo receive.opt messages.opt
|
all: receive messages
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f receive *.bak *~ core *.o .depend *.opt *.out *.cm*
|
rm -f receive messages *.bak *~ core *.o .depend *.opt *.out *.cm*
|
||||||
|
|
||||||
OCAMLC = ocamlc
|
OCAMLC = ocamlc
|
||||||
OCAMLOPT = ocamlopt
|
OCAMLOPT = ocamlopt
|
||||||
INCLUDES= -I ../../lib/ocaml -I +lablgtk2
|
INCLUDES= -I ../../lib/ocaml -I +lablgtk2
|
||||||
|
|
||||||
messages.opt : messages.ml
|
messages: messages.ml
|
||||||
$(OCAMLOPT) $(INCLUDES) -o $@ unix.cmxa xml-light.cmxa glibivy-ocaml.cmxa -I +lablgtk2 lablgtk.cmxa gtkInit.cmx str.cmxa lib.cmxa $^
|
$(OCAMLC) $(INCLUDES) -o /dev/null unix.cma xml-light.cma glibivy-ocaml.cma -I +lablgtk2 lablgtk.cma gtkInit.cmo str.cma lib-pprz.cma $^ # To check
|
||||||
strip $@
|
cat ../../../pprz_src_test.sh > $@
|
||||||
|
echo 'lablgtk2 str.cma ivy-ocaml.cma -I $$PAPARAZZI_SRC/sw/lib/ocaml lib-pprz.cma $$PAPARAZZI_SRC/sw/ground_segment/tmtc/$< $$*' >> $@
|
||||||
|
chmod a+x $@
|
||||||
|
|
||||||
messages.run:
|
|
||||||
lablgtk2 str.cma -I ../../lib/ocaml ivy-ocaml.cma lib.cma messages.cmo
|
|
||||||
|
|
||||||
receive.opt : modem.ml receive.ml
|
receive : modem.cmo receive.ml
|
||||||
$(OCAMLOPT) $(INCLUDES) -o $@ str.cmxa unix.cmxa xml-light.cmxa glibivy-ocaml.cmxa -I +lablgtk2 lablgtk.cmxa lib.cmxa $^
|
$(OCAMLC) $(INCLUDES) -o $@ str.cma unix.cma xml-light.cma glibivy-ocaml.cma -I +lablgtk2 lablgtk.cma lib-pprz.cma $^ #To check
|
||||||
strip $@
|
cat ../../../pprz_src_test.sh > $@
|
||||||
|
echo 'lablgtk2 str.cma glibivy-ocaml.cma -I $$PAPARAZZI_SRC/sw/lib/ocaml lib-pprz.cma -I $$PAPARAZZI_SRC/sw/ground_segment/tmtc $$PAPARAZZI_SRC/sw/ground_segment/tmtc/modem.cmo $$PAPARAZZI_SRC/sw/ground_segment/tmtc/receive.ml $$*' >> $@
|
||||||
|
chmod a+x $@
|
||||||
|
|
||||||
listen.opt : listen.ml
|
listen.opt : listen.ml
|
||||||
$(OCAMLOPT) $(INCLUDES) -o $@ str.cmxa unix.cmxa xml-light.cmxa glibivy-ocaml.cmxa -I +lablgtk2 lablgtk.cmxa lib.cmxa $^
|
$(OCAMLOPT) $(INCLUDES) -o $@ str.cmxa unix.cmxa xml-light.cmxa glibivy-ocaml.cmxa -I +lablgtk2 lablgtk.cmxa lib.cmxa $^
|
||||||
strip $@
|
strip $@
|
||||||
|
|
||||||
receive.out : modem.ml receive.ml
|
|
||||||
$(OCAMLC) -g $(INCLUDES) -o $@ str.cma unix.cma xml-light.cma glibivy-ocaml.cma -I +lablgtk2 lablgtk.cma lib.cma $^
|
|
||||||
|
|
||||||
|
|
||||||
receive.run:
|
|
||||||
lablgtk2 str.cma -I ../../lib/ocaml ivy-ocaml.cma lib.cma modem.cmo receive.ml
|
|
||||||
|
|
||||||
|
|
||||||
%.cmo : %.ml
|
%.cmo : %.ml
|
||||||
$(OCAMLC) $(INCLUDES) -c $<
|
$(OCAMLC) $(INCLUDES) -c $<
|
||||||
|
|||||||
@@ -12,22 +12,22 @@ OBJS= $(SRC:.ml=.cmo)
|
|||||||
LINK= $(OCAMLC) $(MLFLAGS)
|
LINK= $(OCAMLC) $(MLFLAGS)
|
||||||
LIBS_CI = ci_core.cma ci_gif.cma ci_jpeg.cma ci_tiff.cma ci_bmp.cma ci_ppm.cma ci_png.cma \
|
LIBS_CI = ci_core.cma ci_gif.cma ci_jpeg.cma ci_tiff.cma ci_bmp.cma ci_ppm.cma ci_png.cma \
|
||||||
ci_xpm.cma ci_ps.cma ci_freetype.cma
|
ci_xpm.cma ci_ps.cma ci_freetype.cma
|
||||||
STDLIBS = unix.cma str.cmxa xml-light.cma lablgtk.cma lablgl.cma lablgtkgl.cma $(LIBS_CI)
|
STDLIBS = unix.cma str.cma xml-light.cma lablgtk.cma lablgnomecanvas.cma lablgl.cma lablgtkgl.cma $(LIBS_CI)
|
||||||
ADD_LIBS = lib.cma xlib.cma glibivy-ocaml.cma
|
ADD_LIBS = lib-pprz.cma xlib-pprz.cma glibivy-ocaml.cma
|
||||||
CLIBS = -cclib -lpthread
|
CLIBS = -cclib -lpthread
|
||||||
|
|
||||||
all: mapGL.opt
|
all: mapGL
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
\rm -f *.cm* *.o *.a *~ *.opt *.out *.top *.output *obj *exe \
|
\rm -f mapGL *.cm* *.o *.a *~ *.opt *.out *.top *.output *obj *exe \
|
||||||
stars_lexer.ml stars_parser.mli stars_parser.ml .depend
|
stars_lexer.ml stars_parser.mli stars_parser.ml .depend
|
||||||
|
|
||||||
# Executables
|
# Executables
|
||||||
mapGL.out: $(OBJS)
|
mapGL: mapGL.ml
|
||||||
$(OCAMLC) $(MLFLAGS) $(STDLIBS) gtkInit.cmo $(ADD_LIBS) -o $@ $(OBJS_3D) $(OBJS) $(CLIBS)
|
$(OCAMLC) $(MLFLAGS) $(STDLIBS) gtkInit.cmo $(ADD_LIBS) -o $@ $< $(CLIBS) # To check
|
||||||
|
cat ../../../pprz_src_test.sh > $@
|
||||||
mapGL.opt: $(OBJS:.cmo=.cmx)
|
echo 'ocaml -I +lablgtk2 -I +lablGL -I +camlimages -I $$PAPARAZZI_SRC/sw/lib/ocaml $(STDLIBS) gtkInit.cmo $(ADD_LIBS) $$PAPARAZZI_SRC/sw/ground_segment/visu3d/$< $$*' >> $@
|
||||||
$(OCAMLOPT) $(MLFLAGS) $(STDLIBS:.cma=.cmxa) gtkInit.cmx $(ADD_LIBS:.cma=.cmxa) -o $@ $(OBJS:.cmo=.cmx) $(CLIBS)
|
chmod a+x $@
|
||||||
|
|
||||||
# Do not edit below this line
|
# Do not edit below this line
|
||||||
|
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ let build_interface = fun map_file mission_file ->
|
|||||||
let (window, vbox, factory, accel_group, menus, menu_help) =
|
let (window, vbox, factory, accel_group, menus, menu_help) =
|
||||||
Gtk_tools.create_window_with_menubar_help ("Visu Drone v"^version)
|
Gtk_tools.create_window_with_menubar_help ("Visu Drone v"^version)
|
||||||
width height liste_menus in
|
width height liste_menus in
|
||||||
window#connect#destroy ~callback:GMain.Main.quit;
|
ignore (window#connect#destroy ~callback:GMain.Main.quit);
|
||||||
|
|
||||||
(* Creation du Widget OpenGL *)
|
(* Creation du Widget OpenGL *)
|
||||||
let view3d = new widget_3d vbox#add false "" in
|
let view3d = new widget_3d vbox#add false "" in
|
||||||
@@ -407,27 +407,27 @@ let build_interface = fun map_file mission_file ->
|
|||||||
(* Creation des menus : Sol *)
|
(* Creation des menus : Sol *)
|
||||||
let factory = new GMenu.factory menus.(!nb_menus) ~accel_group in
|
let factory = new GMenu.factory menus.(!nb_menus) ~accel_group in
|
||||||
incr nb_menus ;
|
incr nb_menus ;
|
||||||
factory#add_item "Load Background"
|
ignore (factory#add_item "Load Background"
|
||||||
~callback:(on_load_surface window view3d id_sol) ;
|
~callback:(on_load_surface window view3d id_sol)) ;
|
||||||
|
|
||||||
(* Creation des menus : Trajectoires *)
|
(* Creation des menus : Trajectoires *)
|
||||||
let factory = new GMenu.factory menus.(!nb_menus) ~accel_group in
|
let factory = new GMenu.factory menus.(!nb_menus) ~accel_group in
|
||||||
incr nb_menus ;
|
incr nb_menus ;
|
||||||
factory#add_item "Load Track" ~callback:(load_trajectory view3d lst_ids_trajs) ;
|
ignore (factory#add_item "Load Track" ~callback:(load_trajectory view3d lst_ids_trajs)) ;
|
||||||
factory#add_item "Edit Tracks"
|
ignore (factory#add_item "Edit Tracks"
|
||||||
~callback:(build_lst_traj tooltips view3d lst_ids_trajs) ;
|
~callback:(build_lst_traj tooltips view3d lst_ids_trajs)) ;
|
||||||
|
|
||||||
(* Creation des menus : Parametres *)
|
(* Creation des menus : Parametres *)
|
||||||
let factory = new GMenu.factory menus.(!nb_menus) ~accel_group in
|
let factory = new GMenu.factory menus.(!nb_menus) ~accel_group in
|
||||||
incr nb_menus ;
|
incr nb_menus ;
|
||||||
factory#add_item "Edit" ~callback:(fun () -> ()) ;
|
ignore (factory#add_item "Edit" ~callback:(fun () -> ())) ;
|
||||||
|
|
||||||
(* Aide *)
|
(* Aide *)
|
||||||
let factory = new GMenu.factory menu_help in
|
let factory = new GMenu.factory menu_help in
|
||||||
factory#add_item "A propos" ~callback:build_fen_about ;
|
ignore (factory#add_item "A propos" ~callback:build_fen_about) ;
|
||||||
factory#add_item "Help keys/mouse"
|
ignore (factory#add_item "Help keys/mouse"
|
||||||
~callback:(fun () -> Gtk_tools.display_file filename_help_keys
|
~callback:(fun () -> Gtk_tools.display_file filename_help_keys
|
||||||
"Aide touches clavier" 370 500 tooltips (Some "fixed")) ;
|
"Aide touches clavier" 370 500 tooltips (Some "fixed"))) ;
|
||||||
|
|
||||||
(* Affichage de la fenetre principale *)
|
(* Affichage de la fenetre principale *)
|
||||||
window#show () ;
|
window#show () ;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
include ../../../conf/Makefile.local
|
include ../../../conf/Makefile.local
|
||||||
|
|
||||||
all: wind.opt
|
all: wind
|
||||||
|
|
||||||
INCLUDES= -I ../../lib/ocaml -I +lablgtk2
|
INCLUDES= -I ../../lib/ocaml -I +lablgtk2
|
||||||
|
|
||||||
@@ -33,9 +33,12 @@ OCAMLDEP= ocamldep $(INCLUDES)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
wind.opt : wind.cmx
|
wind : wind.ml
|
||||||
$(OCAMLOPT) -o $@ xml-light.cmxa glibivy-ocaml.cmxa lablgtk.cmxa str.cmxa lib.cmxa $<
|
$(OCAMLC) -o $@ xml-light.cma glibivy-ocaml.cma lablgtk.cma str.cma lib-pprz.cma $< # To check
|
||||||
strip $@
|
cat ../../../pprz_src_test.sh > $@
|
||||||
|
echo 'ocaml -I +lablgtk2 -I $$PAPARAZZI_SRC/sw/lib/ocaml xml-light.cma glibivy-ocaml.cma lablgtk.cma str.cma lib-pprz.cma $$PAPARAZZI_SRC/sw/ground_segment/wind/$< $$*' >> $@
|
||||||
|
chmod a+x $@
|
||||||
|
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .ml .mli .mly .mll .cmi .cmo .cmx .out .opt .p.cmx .popt
|
.SUFFIXES: .ml .mli .mly .mll .cmi .cmo .cmx .out .opt .p.cmx .popt
|
||||||
|
|||||||
+12
-11
@@ -21,7 +21,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES= -I +lablgl -I +camlimages -I +lablgtk2
|
INCLUDES= -I +lablgl -I +camlimages -I +lablgtk2
|
||||||
OCAMLC=ocamlc -g $(INCLUDES)
|
OCAMLC=ocamlc $(INCLUDES)
|
||||||
OCAMLOPT=ocamlopt $(INCLUDES)
|
OCAMLOPT=ocamlopt $(INCLUDES)
|
||||||
|
|
||||||
|
|
||||||
@@ -34,22 +34,23 @@ XCMO = $(XSRC:.ml=.cmo)
|
|||||||
XCMX = $(XSRC:.ml=.cmx)
|
XCMX = $(XSRC:.ml=.cmx)
|
||||||
|
|
||||||
|
|
||||||
all : lib.cma lib.cmxa xlib.cma xlib.cmxa xml_get.out
|
all : lib-pprz.cma xlib-pprz.cma xml_get.out
|
||||||
|
# lib-pprz.cmxa xlib-pprz.cmxa
|
||||||
|
|
||||||
|
|
||||||
lib.cma : $(CMO)
|
lib-pprz.cma : $(CMO)
|
||||||
ocamlmklib -custom -o lib str.cma xml-light.cma unix.cma $^
|
ocamlmklib -o lib-pprz str.cma xml-light.cma unix.cma $^
|
||||||
|
|
||||||
lib.cmxa : $(CMX)
|
lib-pprz.cmxa : $(CMX)
|
||||||
ocamlmklib -custom -o lib $^
|
ocamlmklib -o lib-pprz $^
|
||||||
|
|
||||||
xlib.cma : $(XCMO)
|
xlib-pprz.cma : $(XCMO)
|
||||||
ocamlmklib -custom -o xlib $^
|
ocamlmklib -o xlib-pprz $^
|
||||||
|
|
||||||
xlib.cmxa : $(XCMX)
|
xlib-pprz.cmxa : $(XCMX)
|
||||||
ocamlmklib -custom -o xlib $^
|
ocamlmklib -o xlib-pprz $^
|
||||||
|
|
||||||
xml_get.out : lib.cma xml_get.cmo
|
xml_get.out : lib-pprz.cma xml_get.cmo
|
||||||
$(OCAMLC) -o $@ str.cma xml-light.cma -I . $^
|
$(OCAMLC) -o $@ str.cma xml-light.cma -I . $^
|
||||||
|
|
||||||
ignutm.opt : latlong.cmx ignutm.ml
|
ignutm.opt : latlong.cmx ignutm.ml
|
||||||
|
|||||||
+11
-6
@@ -53,7 +53,8 @@ type type_descr = {
|
|||||||
|
|
||||||
|
|
||||||
let (//) = Filename.concat
|
let (//) = Filename.concat
|
||||||
let messages_xml = Xml.parse_file (Env.paparazzi_src // "conf" // "messages.xml")
|
let lazy_messages_xml = lazy (Xml.parse_file (Env.paparazzi_src // "conf" // "messages.xml"))
|
||||||
|
let messages_xml = fun () -> Lazy.force lazy_messages_xml
|
||||||
|
|
||||||
external float_of_bytes : string -> int -> float = "c_float_of_indexed_bytes"
|
external float_of_bytes : string -> int -> float = "c_float_of_indexed_bytes"
|
||||||
external int32_of_bytes : string -> int -> int32 = "c_int32_of_indexed_bytes"
|
external int32_of_bytes : string -> int -> int32 = "c_int32_of_indexed_bytes"
|
||||||
@@ -85,8 +86,9 @@ let field_of_xml = fun xml ->
|
|||||||
|
|
||||||
(** Table of msg classes indexed by name. Each class is a table of messages
|
(** Table of msg classes indexed by name. Each class is a table of messages
|
||||||
indexed by ids *)
|
indexed by ids *)
|
||||||
let classes = Hashtbl.create 13
|
let lazy_classes =
|
||||||
let _ =
|
lazy
|
||||||
|
(let h = Hashtbl.create 13 in
|
||||||
List.iter
|
List.iter
|
||||||
(fun xml_class ->
|
(fun xml_class ->
|
||||||
let by_id = Hashtbl.create 13
|
let by_id = Hashtbl.create 13
|
||||||
@@ -105,9 +107,12 @@ let _ =
|
|||||||
with _ ->
|
with _ ->
|
||||||
fprintf stderr "Warning: Ignoring '%s'\n" (Xml.to_string xml_msg))
|
fprintf stderr "Warning: Ignoring '%s'\n" (Xml.to_string xml_msg))
|
||||||
(Xml.children xml_class);
|
(Xml.children xml_class);
|
||||||
Hashtbl.add classes (ExtXml.attrib xml_class "name") (by_id, by_name)
|
Hashtbl.add h (ExtXml.attrib xml_class "name") (by_id, by_name)
|
||||||
)
|
)
|
||||||
(Xml.children messages_xml)
|
(Xml.children (messages_xml ()));
|
||||||
|
h)
|
||||||
|
|
||||||
|
let classes = fun () -> Lazy.force lazy_classes
|
||||||
|
|
||||||
let magic = fun x -> (Obj.magic x:('a,'b,'c) Pervasives.format)
|
let magic = fun x -> (Obj.magic x:('a,'b,'c) Pervasives.format)
|
||||||
|
|
||||||
@@ -129,7 +134,7 @@ module Protocol(Class:CLASS) = struct
|
|||||||
let index_start = fun buf ->
|
let index_start = fun buf ->
|
||||||
String.index buf stx
|
String.index buf stx
|
||||||
|
|
||||||
let messages_by_id, messages_by_name = Hashtbl.find classes Class.name
|
let messages_by_id, messages_by_name = Hashtbl.find (classes ()) Class.name
|
||||||
let message_of_id = fun id -> Hashtbl.find messages_by_id (id (*** +1 ***))
|
let message_of_id = fun id -> Hashtbl.find messages_by_id (id (*** +1 ***))
|
||||||
let message_of_name = fun name -> Hashtbl.find messages_by_name name
|
let message_of_name = fun name -> Hashtbl.find messages_by_name name
|
||||||
|
|
||||||
|
|||||||
@@ -20,13 +20,16 @@
|
|||||||
# Boston, MA 02111-1307, USA.
|
# Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
|
|
||||||
OCAMLC = ocamlc -I ../lib/ocaml
|
OCAMLC = ocamlc
|
||||||
OCAMLOPT = ocamlopt -I ../lib/ocaml
|
OCAMLOPT = ocamlopt
|
||||||
|
|
||||||
all: play.opt
|
all: play
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.opt *.out *~ core *.o *.bak .depend *.cm*
|
rm -f *.opt *.out *~ core *.o *.bak .depend *.cm* play
|
||||||
|
|
||||||
play.opt : play.ml
|
play : play.ml
|
||||||
$(OCAMLOPT) -o $@ unix.cmxa glibivy-ocaml.cmxa -I +lablgtk2 lablgtk.cmxa gtkInit.cmx $^
|
$(OCAMLC) -o $@ unix.cma glibivy-ocaml.cma -I +lablgtk2 lablgtk.cma gtkInit.cmo $^ # to check
|
||||||
|
cat ../../pprz_src_test.sh > $@
|
||||||
|
echo 'lablgtk2 unix.cma glibivy-ocaml.cma $$PAPARAZZI_SRC/sw/logalizer/$< $$*' >> $@
|
||||||
|
chmod a+x $@
|
||||||
|
|||||||
+17
-7
@@ -34,6 +34,7 @@ SIMSCMO=$(SIMSML:%.ml=%.cmo)
|
|||||||
SIMSCMX=$(SIMSML:%.ml=%.cmx)
|
SIMSCMX=$(SIMSML:%.ml=%.cmx)
|
||||||
SIMSC = sim_ir.c sim_gps.c sim_ap.c estimator.c pid.c nav.c main.c
|
SIMSC = sim_ir.c sim_gps.c sim_ap.c estimator.c pid.c nav.c main.c
|
||||||
SIMSO=$(SIMSC:%.c=$(OBJDIR)/%.o)
|
SIMSO=$(SIMSC:%.c=$(OBJDIR)/%.o)
|
||||||
|
SIMSA=sims.cma
|
||||||
|
|
||||||
OCAMLC = ocamlc
|
OCAMLC = ocamlc
|
||||||
OCAMLOPT=ocamlopt -p
|
OCAMLOPT=ocamlopt -p
|
||||||
@@ -46,7 +47,7 @@ VARINCLUDE=$(PAPARAZZI_HOME)/var/include
|
|||||||
ACINCLUDE = $(PAPARAZZI_HOME)/var/$(AIRCRAFT)
|
ACINCLUDE = $(PAPARAZZI_HOME)/var/$(AIRCRAFT)
|
||||||
|
|
||||||
MESSAGES = ../../conf/messages.xml
|
MESSAGES = ../../conf/messages.xml
|
||||||
GEN_DOWNLINK = ./gen_downlink.out
|
GEN_DOWNLINK = ./gen_downlink
|
||||||
|
|
||||||
SIMDIR=$(shell echo `pwd`)
|
SIMDIR=$(shell echo `pwd`)
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@ SIMDIR=$(shell echo `pwd`)
|
|||||||
#all : simhitl.out sitl.cma $(GEN_DOWNLINK)
|
#all : simhitl.out sitl.cma $(GEN_DOWNLINK)
|
||||||
all : sitl.cma $(GEN_DOWNLINK)
|
all : sitl.cma $(GEN_DOWNLINK)
|
||||||
|
|
||||||
sim_sitl : $(OBJDIR)/simsitl.out
|
sim_sitl : $(OBJDIR)/simsitl
|
||||||
|
|
||||||
simhitl.out : $(SIMHCMO) simhitl.cmo
|
simhitl.out : $(SIMHCMO) simhitl.cmo
|
||||||
$(OCAMLC) $(INCLUDES) -o $@ str.cma xml-light.cma unix.cma lib.cma lablgtk.cma gtkInit.cmo $^
|
$(OCAMLC) $(INCLUDES) -o $@ str.cma xml-light.cma unix.cma lib.cma lablgtk.cma gtkInit.cmo $^
|
||||||
@@ -66,8 +67,15 @@ sitl.cma : $(SIMSCMO)
|
|||||||
sitl.cmxa : $(SIMSCMX)
|
sitl.cmxa : $(SIMSCMX)
|
||||||
ocamlopt -o $@ -a $^
|
ocamlopt -o $@ -a $^
|
||||||
|
|
||||||
$(OBJDIR)/simsitl.out : sitl.cma $(SIMSO) $(OBJDIR)/simsitl.cmo
|
$(OBJDIR)/$(SIMSA) : $(SIMSO)
|
||||||
$(OCAMLC) $(INCLUDES) -custom -o $@ glibivy-ocaml.cma xml-light.cma unix.cma lib.cma lablgtk.cma gtkInit.cmo $(SIMSO) sitl.cma $(OBJDIR)/simsitl.cmo
|
touch $(OBJDIR)/dummy.ml
|
||||||
|
cd $(OBJDIR); ocamlmklib -o sims $^ dummy.ml
|
||||||
|
|
||||||
|
$(OBJDIR)/simsitl : $(OBJDIR)/$(SIMSA) sitl.cma $(OBJDIR)/simsitl.ml
|
||||||
|
$(OCAMLC) $(INCLUDES) -o $@ glibivy-ocaml.cma xml-light.cma unix.cma lib-pprz.cma lablgtk.cma gtkInit.cmo -I $(OBJDIR) $(SIMSA) sitl.cma $(OBJDIR)/simsitl.ml # To check
|
||||||
|
cat ../../pprz_src_test.sh > $@
|
||||||
|
echo 'lablgtk2 -I $$PAPARAZZI_SRC/sw/lib/ocaml -I $(OBJDIR) glibivy-ocaml.cma xml-light.cma lib-pprz.cma $(SIMSA) $$PAPARAZZI_SRC/sw/simulator/sitl.cma -I $$PAPARAZZI_SRC/sw/simulator $(OBJDIR)/simsitl.ml $$*' >> $@
|
||||||
|
chmod a+x $@
|
||||||
|
|
||||||
$(OBJDIR)/simsitl.opt : $(SIMSO) $(OBJDIR)/simsitl.cmx
|
$(OBJDIR)/simsitl.opt : $(SIMSO) $(OBJDIR)/simsitl.cmx
|
||||||
$(OCAMLOPT) $(INCLUDES) -o $@ str.cmxa glibivy-ocaml.cmxa xml-light.cmxa unix.cmxa lib.cmxa lablgtk.cmxa gtkInit.cmx $(SIMSO) sitl.cmxa $(OBJDIR)/simsitl.cmx
|
$(OCAMLOPT) $(INCLUDES) -o $@ str.cmxa glibivy-ocaml.cmxa xml-light.cmxa unix.cmxa lib.cmxa lablgtk.cmxa gtkInit.cmx $(SIMSO) sitl.cmxa $(OBJDIR)/simsitl.cmx
|
||||||
@@ -90,8 +98,10 @@ $(OBJDIR)/downlink.h : $(MESSAGES) $(GEN_DOWNLINK)
|
|||||||
$(GEN_DOWNLINK) $< > $@
|
$(GEN_DOWNLINK) $< > $@
|
||||||
|
|
||||||
$(GEN_DOWNLINK) : gen_downlink.ml
|
$(GEN_DOWNLINK) : gen_downlink.ml
|
||||||
$(OCAMLC) $(INCLUDES) -o $@ str.cma xml-light.cma lib.cma $<
|
$(OCAMLC) $(INCLUDES) -o $@ str.cma xml-light.cma lib-pprz.cma $< # To check
|
||||||
|
cat ../../pprz_src_test.sh > $@
|
||||||
|
echo 'ocaml -I $$PAPARAZZI_SRC/sw/lib/ocaml str.cma xml-light.cma lib-pprz.cma $$PAPARAZZI_SRC/sw/simulator/$< $$*' >> $@
|
||||||
|
chmod a+x $@
|
||||||
|
|
||||||
$(OBJDIR)/simsitl.cmo : $(OBJDIR)/simsitl.ml
|
$(OBJDIR)/simsitl.cmo : $(OBJDIR)/simsitl.ml
|
||||||
$(OCAMLC) $(INCLUDES) -c -o $@ $<
|
$(OCAMLC) $(INCLUDES) -c -o $@ $<
|
||||||
@@ -113,7 +123,7 @@ $(OBJDIR)/simsitl.ml : simsitl.ml
|
|||||||
$(OCAMLC) $(INCLUDES) -c $<
|
$(OCAMLC) $(INCLUDES) -c $<
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
\rm -f *.cm* *~ *.out .depend *.o
|
\rm -f *.cm* *~ *.out .depend *.o $(GEN_DOWNLINK)
|
||||||
|
|
||||||
.depend:
|
.depend:
|
||||||
ocamldep *.ml* > .depend
|
ocamldep *.ml* > .depend
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ let one_message = fun m ->
|
|||||||
printf "}\n\n"
|
printf "}\n\n"
|
||||||
|
|
||||||
let _ =
|
let _ =
|
||||||
|
if Array.length Sys.argv <> 2 then
|
||||||
|
failwith (sprintf "Usage: %s <xml message file>" Sys.argv.(0));
|
||||||
let xml = Xml2h.start_and_begin Sys.argv.(1) h_name in
|
let xml = Xml2h.start_and_begin Sys.argv.(1) h_name in
|
||||||
let xml = ExtXml.child xml ~select:(fun x -> Xml.attrib x "name"="telemetry_ap") "class" in
|
let xml = ExtXml.child xml ~select:(fun x -> Xml.attrib x "name"="telemetry_ap") "class" in
|
||||||
let messages = (Xml.children xml) in
|
let messages = (Xml.children xml) in
|
||||||
|
|||||||
+1
-1
@@ -120,7 +120,7 @@ module Make(AircraftItl : AIRCRAFT_ITL) = struct
|
|||||||
let gust_norm_max_adj = GData.adjustment ~value:0. ~lower:(0.) ~upper:20. ~step_incr:0.1 () in
|
let gust_norm_max_adj = GData.adjustment ~value:0. ~lower:(0.) ~upper:20. ~step_incr:0.1 () in
|
||||||
let gust_norm_ch_fact_adj = GData.adjustment ~value:0. ~lower:(0.) ~upper:20. ~step_incr:0.1 () in
|
let gust_norm_ch_fact_adj = GData.adjustment ~value:0. ~lower:(0.) ~upper:20. ~step_incr:0.1 () in
|
||||||
let gust_dir_ch_fact_adj = GData.adjustment ~value:0. ~lower:(0.) ~upper:20. ~step_incr:0.1 () in
|
let gust_dir_ch_fact_adj = GData.adjustment ~value:0. ~lower:(0.) ~upper:20. ~step_incr:0.1 () in
|
||||||
let infrared_contrast_adj = GData.adjustment ~value:0. ~lower:(0.) ~upper:1010. ~step_incr:10. () in
|
let infrared_contrast_adj = GData.adjustment ~value:500. ~lower:(0.) ~upper:1010. ~step_incr:10. () in
|
||||||
|
|
||||||
let run = ref false in
|
let run = ref false in
|
||||||
let scheduler =
|
let scheduler =
|
||||||
|
|||||||
+10
-3
@@ -1,13 +1,17 @@
|
|||||||
|
OCAML=ocaml
|
||||||
OCAMLC=ocamlc -g -I ../lib/ocaml
|
OCAMLC=ocamlc -g -I ../lib/ocaml
|
||||||
OCAMLLEX=ocamllex
|
OCAMLLEX=ocamllex
|
||||||
OCAMLYACC=ocamlyacc
|
OCAMLYACC=ocamlyacc
|
||||||
|
|
||||||
all: gen_aircraft.out gen_airframe.out gen_calib.out gen_messages.out gen_ubx.out gen_flight_plan.out gen_radio.out
|
all: gen_aircraft.out gen_airframe.out gen_calib.out gen_messages.out gen_ubx.out gen_flight_plan.out gen_radio.out
|
||||||
|
|
||||||
FP_CMO = fp_syntax.cmo fp_parser.cmo fp_lexer.cmo fp_proc.cmo gen_flight_plan.cmo
|
FP_CMO = fp_syntax.cmo fp_parser.cmo fp_lexer.cmo fp_proc.cmo gen_flight_plan.ml
|
||||||
|
ABS_FP = $(FP_CMO:%=$$PAPARAZZI_SRC/sw/tools/%)
|
||||||
|
|
||||||
gen_flight_plan.out : $(FP_CMO)
|
gen_flight_plan.out : $(FP_CMO)
|
||||||
$(OCAMLC) lib.cma $^ -o $@
|
cat ../../pprz_src_test.sh > $@
|
||||||
|
echo '$(OCAML) -I $$PAPARAZZI_SRC/sw/lib/ocaml -I $$PAPARAZZI_SRC/sw/tools lib-pprz.cma $(ABS_FP) $$*' >> $@
|
||||||
|
chmod a+x $@
|
||||||
|
|
||||||
fp_parser.cmo : fp_parser.cmi fp_syntax.cmi
|
fp_parser.cmo : fp_parser.cmi fp_syntax.cmi
|
||||||
fp_parser.cmi : fp_parser.ml fp_syntax.cmi
|
fp_parser.cmi : fp_parser.ml fp_syntax.cmi
|
||||||
@@ -18,7 +22,10 @@ fp_syntax.cmo : fp_syntax.cmi
|
|||||||
|
|
||||||
|
|
||||||
%.out : %.ml
|
%.out : %.ml
|
||||||
$(OCAMLC) lib.cma $< -o $@
|
$(OCAMLC) -o /dev/null lib-pprz.cma $< # To check
|
||||||
|
cat ../../pprz_src_test.sh > $@
|
||||||
|
echo '$(OCAML) -I $$PAPARAZZI_SRC/sw/lib/ocaml lib-pprz.cma $$PAPARAZZI_SRC/sw/tools/$< $$*' >> $@
|
||||||
|
chmod a+x $@
|
||||||
|
|
||||||
%.cmo : %.ml
|
%.cmo : %.ml
|
||||||
$(OCAMLC) -c $<
|
$(OCAMLC) -c $<
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ let mkdir = fun d ->
|
|||||||
Unix.mkdir d 0o755
|
Unix.mkdir d 0o755
|
||||||
|
|
||||||
let _ =
|
let _ =
|
||||||
|
if Array.length Sys.argv <> 2 then
|
||||||
|
failwith (sprintf "Usage: %s <xml_airframe_file>" Sys.argv.(0));
|
||||||
let aircraft = Sys.argv.(1) in
|
let aircraft = Sys.argv.(1) in
|
||||||
let conf = Xml.parse_file conf_xml in
|
let conf = Xml.parse_file conf_xml in
|
||||||
let aircraft_xml =
|
let aircraft_xml =
|
||||||
|
|||||||
@@ -358,12 +358,14 @@ let check_distance = fun (hx, hy) max_d wp ->
|
|||||||
|
|
||||||
|
|
||||||
let _ =
|
let _ =
|
||||||
let xml_file = ref "fligh_plan.xml"
|
let xml_file = ref ""
|
||||||
and dump = ref false in
|
and dump = ref false in
|
||||||
Arg.parse [("-dump", Arg.Set dump, "Dump compile result");
|
Arg.parse [("-dump", Arg.Set dump, "Dump compile result");
|
||||||
("-nocheck", Arg.Clear check_expressions, "Disable expression checking")]
|
("-nocheck", Arg.Clear check_expressions, "Disable expression checking")]
|
||||||
(fun f -> xml_file := f)
|
(fun f -> xml_file := f)
|
||||||
"Usage:";
|
"Usage:";
|
||||||
|
if !xml_file = "" then
|
||||||
|
failwith (sprintf "Usage: %s <xml-flight-plan-file>" Sys.argv.(0));
|
||||||
try
|
try
|
||||||
let xml = Xml.parse_file !xml_file in
|
let xml = Xml.parse_file !xml_file in
|
||||||
let dir = Filename.dirname !xml_file in
|
let dir = Filename.dirname !xml_file in
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ end
|
|||||||
|
|
||||||
let _ =
|
let _ =
|
||||||
if Array.length Sys.argv <> 3 then begin
|
if Array.length Sys.argv <> 3 then begin
|
||||||
fprintf stderr "Usage: %s <.xml file> <class_name>" Sys.argv.(0)
|
failwith (sprintf "Usage: %s <.xml file> <class_name>" Sys.argv.(0))
|
||||||
end;
|
end;
|
||||||
let filename = Sys.argv.(1) in
|
let filename = Sys.argv.(1) in
|
||||||
let class_name = Sys.argv.(2) in
|
let class_name = Sys.argv.(2) in
|
||||||
|
|||||||
@@ -100,6 +100,9 @@ let parse_class = fun c ->
|
|||||||
|
|
||||||
|
|
||||||
let _ =
|
let _ =
|
||||||
|
if Array.length Sys.argv <> 2 then begin
|
||||||
|
failwith (sprintf "Usage: %s <.xml ubx protocol file>" Sys.argv.(0))
|
||||||
|
end;
|
||||||
let xml_file = Sys.argv.(1) in
|
let xml_file = Sys.argv.(1) in
|
||||||
try
|
try
|
||||||
let xml = Xml.parse_file xml_file in
|
let xml = Xml.parse_file xml_file in
|
||||||
|
|||||||
Reference in New Issue
Block a user