From 74f8b746245f2dfd83fceacc34ad83065e202aef Mon Sep 17 00:00:00 2001 From: Michal Podhradsky Date: Tue, 13 Jun 2017 13:39:10 -0700 Subject: [PATCH] First shot towards a separate HITL target (#2062) * First shot towards a separate HITL target * Changes in HITL - still doesn't compile * Added makefile selection * HITL target works for fixedwing and rotorcraft - still needs cleanup and TLC * Removed info messages from compilation process --- conf/Makefile.hitl | 4 ++ conf/Makefile.nps | 1 - .../AGGIEAIR/aggieair_ark_hexa_1-8.xml | 11 ++- conf/airframes/AGGIEAIR/aggieair_conf.xml | 6 +- .../AGGIEAIR/aggieair_control_panel.xml | 2 + .../AGGIEAIR/aggieair_minion_rp3_lia.xml | 6 +- conf/firmwares/rotorcraft.makefile | 8 ++- .../subsystems/fixedwing/autopilot.makefile | 6 +- .../subsystems/shared/baro_board.makefile | 6 +- .../{nps_hitl.makefile => hitl.makefile} | 9 +-- conf/firmwares/subsystems/shared/nps.makefile | 68 ++----------------- .../subsystems/shared/nps_common.makefile | 63 +++++++++++++++++ .../subsystems/shared/nps_sitl.makefile | 13 ---- .../firmwares/subsystems/shared/uart.makefile | 4 ++ conf/firmwares/subsystems/shared/udp.makefile | 4 ++ conf/modules/fdm_jsbsim.xml | 2 +- conf/modules/gps_nps.xml | 2 +- conf/modules/guidance_basic_fw.xml | 2 +- conf/modules/guidance_rotorcraft.xml | 2 +- conf/modules/imu_aspirin_v2.2.xml | 2 +- conf/modules/imu_aspirin_v2_common.xml | 2 +- conf/modules/imu_nps.xml | 2 +- conf/modules/ins.xml | 2 +- conf/modules/ins_nps.xml | 6 +- conf/modules/ins_vectornav.xml | 7 +- conf/modules/nav_basic_fw.xml | 2 +- conf/modules/nav_basic_rotorcraft.xml | 2 +- conf/modules/nav_flower.xml | 2 +- conf/modules/nav_launcher.xml | 2 +- conf/modules/nav_line.xml | 2 +- conf/modules/nav_skid_landing.xml | 2 +- conf/modules/nav_survey_poly_osam.xml | 2 +- conf/modules/navigation.xml | 2 +- conf/modules/nps.xml | 18 ++--- conf/modules/radio_control_spektrum.xml | 4 +- conf/modules/stabilization_attitude_fw.xml | 2 +- conf/modules/stabilization_float_euler.xml | 2 +- conf/modules/stabilization_rotorcraft.xml | 2 +- conf/modules/telemetry_nps.xml | 6 +- conf/modules/telemetry_transparent.xml | 2 +- conf/settings/nps.xml | 2 +- sw/lib/ocaml/env.ml | 2 +- sw/simulator/pprzsim-launch | 4 +- 43 files changed, 163 insertions(+), 137 deletions(-) create mode 100644 conf/Makefile.hitl rename conf/firmwares/subsystems/shared/{nps_hitl.makefile => hitl.makefile} (75%) create mode 100644 conf/firmwares/subsystems/shared/nps_common.makefile delete mode 100644 conf/firmwares/subsystems/shared/nps_sitl.makefile diff --git a/conf/Makefile.hitl b/conf/Makefile.hitl new file mode 100644 index 00000000000..90321610430 --- /dev/null +++ b/conf/Makefile.hitl @@ -0,0 +1,4 @@ +$(TARGET).CFLAGS += $(nps.CFLAGS) +$(TARGET).srcs += $(nps.srcs) +$(TARGET).LDFLAGS += $(nps.LDFLAGS) +include $(PAPARAZZI_SRC)/conf/Makefile.nps diff --git a/conf/Makefile.nps b/conf/Makefile.nps index ccbda581275..a19edca2e66 100644 --- a/conf/Makefile.nps +++ b/conf/Makefile.nps @@ -23,7 +23,6 @@ # # This is the common Makefile for the nps target. # - SRC_ARCH = arch/sim OPT ?= 2 diff --git a/conf/airframes/AGGIEAIR/aggieair_ark_hexa_1-8.xml b/conf/airframes/AGGIEAIR/aggieair_ark_hexa_1-8.xml index 589f573a7a1..35da52244e9 100644 --- a/conf/airframes/AGGIEAIR/aggieair_ark_hexa_1-8.xml +++ b/conf/airframes/AGGIEAIR/aggieair_ark_hexa_1-8.xml @@ -24,7 +24,12 @@ Aggie Air ARK - + + + + + + @@ -61,13 +66,13 @@ Aggie Air ARK - + diff --git a/conf/airframes/AGGIEAIR/aggieair_conf.xml b/conf/airframes/AGGIEAIR/aggieair_conf.xml index 1565096c04c..b84091eb647 100644 --- a/conf/airframes/AGGIEAIR/aggieair_conf.xml +++ b/conf/airframes/AGGIEAIR/aggieair_conf.xml @@ -3,11 +3,11 @@ name="Ark_Hexa_1.8" ac_id="4" airframe="airframes/AGGIEAIR/aggieair_ark_hexa_1-8.xml" - radio="radios/AGGIEAIR/aggieair_taranis.xml" + radio="radios/AGGIEAIR/aggieair_sbus_fakerator.xml" telemetry="telemetry/AGGIEAIR/aggieair_rotorcraft.xml" flight_plan="flight_plans/rotorcraft_basic_geofence.xml" settings="settings/rotorcraft_basic.xml settings/nps.xml" - settings_modules="modules/battery_monitor.xml modules/lidar_sf11.xml modules/gps.xml modules/stabilization_float_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml" + settings_modules="modules/lidar_sf11.xml modules/gps.xml modules/stabilization_float_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/imu_common.xml" gui_color="#ffff954c0000" /> + @@ -210,6 +211,7 @@ + diff --git a/conf/airframes/AGGIEAIR/aggieair_minion_rp3_lia.xml b/conf/airframes/AGGIEAIR/aggieair_minion_rp3_lia.xml index cb63f8a9f8a..68919528836 100644 --- a/conf/airframes/AGGIEAIR/aggieair_minion_rp3_lia.xml +++ b/conf/airframes/AGGIEAIR/aggieair_minion_rp3_lia.xml @@ -25,7 +25,11 @@ AggieAir RP3 Minion - + + + + + diff --git a/conf/firmwares/rotorcraft.makefile b/conf/firmwares/rotorcraft.makefile index 0e606bb9b47..221052cf127 100644 --- a/conf/firmwares/rotorcraft.makefile +++ b/conf/firmwares/rotorcraft.makefile @@ -218,6 +218,10 @@ fbw.srcs += $(ns_srcs) ## ## include firmware independent nps makefile and add rotorcraft specifics ## -include $(CFG_SHARED)/nps.makefile -nps.srcs += nps/nps_autopilot_rotorcraft.c +ifneq ($(TARGET), hitl) + include $(CFG_SHARED)/nps.makefile +else + include $(CFG_SHARED)/hitl.makefile +endif +nps.srcs += nps/nps_autopilot_rotorcraft.c diff --git a/conf/firmwares/subsystems/fixedwing/autopilot.makefile b/conf/firmwares/subsystems/fixedwing/autopilot.makefile index 74d1fb07a87..364c6bc0618 100644 --- a/conf/firmwares/subsystems/fixedwing/autopilot.makefile +++ b/conf/firmwares/subsystems/fixedwing/autopilot.makefile @@ -247,7 +247,11 @@ ap.srcs += $(ap_srcs) $(ns_srcs) ## ## include firmware independent nps makefile and add fixedwing specifics ## -include $(CFG_SHARED)/nps.makefile +ifneq ($(TARGET), hitl) + include $(CFG_SHARED)/nps.makefile +else + include $(CFG_SHARED)/hitl.makefile +endif nps.srcs += nps/nps_autopilot_fixedwing.c # add normal ap and fbw sources diff --git a/conf/firmwares/subsystems/shared/baro_board.makefile b/conf/firmwares/subsystems/shared/baro_board.makefile index 2ce51aebf91..6e4cb1611ed 100644 --- a/conf/firmwares/subsystems/shared/baro_board.makefile +++ b/conf/firmwares/subsystems/shared/baro_board.makefile @@ -281,11 +281,15 @@ endif ap.CFLAGS += $(BARO_BOARD_CFLAGS) ap.srcs += $(BARO_BOARD_SRCS) -# don't use for NPS +# don't use for NPS or HITL ifeq ($(TARGET),nps) $(TARGET).CFLAGS += -DUSE_BARO_BOARD=FALSE endif +ifeq ($(TARGET),hitl) +$(TARGET).CFLAGS += -DUSE_BARO_BOARD=FALSE +endif + else # USE_BARO_BOARD is not TRUE, was explicitly disabled ap.CFLAGS += -DUSE_BARO_BOARD=FALSE diff --git a/conf/firmwares/subsystems/shared/nps_hitl.makefile b/conf/firmwares/subsystems/shared/hitl.makefile similarity index 75% rename from conf/firmwares/subsystems/shared/nps_hitl.makefile rename to conf/firmwares/subsystems/shared/hitl.makefile index 30006633407..bd83caa658d 100644 --- a/conf/firmwares/subsystems/shared/nps_hitl.makefile +++ b/conf/firmwares/subsystems/shared/hitl.makefile @@ -5,6 +5,10 @@ # # HITL specific makefile # +# include Makefile.nps instead of Makefile.sim +hitl.MAKEFILE = hitl + +include $(CFG_SHARED)/nps_common.makefile nps.srcs += $(NPSDIR)/nps_main_hitl.c @@ -12,10 +16,6 @@ nps.srcs += $(NPSDIR)/nps_main_hitl.c # will hopefully work better once nps and HITL are separate targets nps.srcs += $(NPSDIR)/nps_ins_vectornav.c -# glib is still needed for some components (such as radio input) -nps.CFLAGS += $(shell pkg-config glib-2.0 --cflags) -nps.LDFLAGS += $(shell pkg-config glib-2.0 --libs) - INS_DEV ?= \"/dev/ttyUSB1\" INS_BAUD ?= B921600 @@ -26,3 +26,4 @@ nps.CFLAGS += -DAP_DEV=\"$(AP_DEV)\" nps.CFLAGS += -DAP_BAUD=$(AP_BAUD) nps.CFLAGS += -DINS_DEV=\"$(INS_DEV)\" nps.CFLAGS += -DINS_BAUD=$(INS_BAUD) + diff --git a/conf/firmwares/subsystems/shared/nps.makefile b/conf/firmwares/subsystems/shared/nps.makefile index 7c2d0052821..ac73b79a5cd 100644 --- a/conf/firmwares/subsystems/shared/nps.makefile +++ b/conf/firmwares/subsystems/shared/nps.makefile @@ -1,71 +1,11 @@ # Hey Emacs, this is a -*- makefile -*- # -# NPS Simulator +# NPS SITL Simulator # -# Common makefile for both SITL/HITL simulation +# SITL specific makefile # -# still needs a FDM backend to be specified, e.g. -# -# - -USE_HITL ?= 0 - -nps.ARCHDIR = sim - # include Makefile.nps instead of Makefile.sim nps.MAKEFILE = nps - -nps.CFLAGS += -DSITL -DUSE_NPS -nps.LDFLAGS += -lm -livy $(shell pcre-config --libs) -lgsl -lgslcblas - -# detect system arch and include rt and pthread library only on linux -UNAME_S := $(shell uname -s) -ifeq ($(UNAME_S),Linux) - nps.LDFLAGS += -lrt -pthread -endif - -nps.CFLAGS += -I$(SRC_FIRMWARE) -I$(SRC_BOARD) -I$(PAPARAZZI_SRC)/sw/simulator -I$(PAPARAZZI_SRC)/sw/simulator/nps -I$(PAPARAZZI_HOME)/conf/simulator/nps - -# sdl needed for joystick input -nps.LDFLAGS += $(shell sdl-config --libs) - - -# -# add the simulator directory to the make searchpath -# -VPATH += $(PAPARAZZI_SRC)/sw/simulator - -NPSDIR = nps -nps.srcs += \ - $(NPSDIR)/nps_random.c \ - $(NPSDIR)/nps_sensors.c \ - $(NPSDIR)/nps_sensors_utils.c \ - $(NPSDIR)/nps_sensor_gyro.c \ - $(NPSDIR)/nps_sensor_accel.c \ - $(NPSDIR)/nps_sensor_mag.c \ - $(NPSDIR)/nps_sensor_baro.c \ - $(NPSDIR)/nps_sensor_sonar.c \ - $(NPSDIR)/nps_sensor_gps.c \ - $(NPSDIR)/nps_sensor_airspeed.c \ - $(NPSDIR)/nps_sensor_temperature.c \ - $(NPSDIR)/nps_sensor_aoa.c \ - $(NPSDIR)/nps_sensor_sideslip.c \ - $(NPSDIR)/nps_electrical.c \ - $(NPSDIR)/nps_atmosphere.c \ - $(NPSDIR)/nps_ivy.c \ - $(NPSDIR)/nps_flightgear.c \ - $(NPSDIR)/nps_radio_control.c \ - $(NPSDIR)/nps_radio_control_joystick.c \ - $(NPSDIR)/nps_radio_control_spektrum.c \ - $(NPSDIR)/nps_main_common.c - -ifeq ($(USE_HITL),1) -include $(CFG_SHARED)/nps_hitl.makefile -else -include $(CFG_SHARED)/nps_sitl.makefile -endif - -# for geo mag calculation -nps.srcs += math/pprz_geodetic_wmm2015.c - +include $(CFG_SHARED)/nps_common.makefile +nps.srcs += $(NPSDIR)/nps_main_sitl.c diff --git a/conf/firmwares/subsystems/shared/nps_common.makefile b/conf/firmwares/subsystems/shared/nps_common.makefile new file mode 100644 index 00000000000..ce389678137 --- /dev/null +++ b/conf/firmwares/subsystems/shared/nps_common.makefile @@ -0,0 +1,63 @@ +# Hey Emacs, this is a -*- makefile -*- + +# +# NPS Simulator +# +# Common makefile for both SITL/HITL simulation +# +# still needs a FDM backend to be specified, e.g. +# +# + +nps.ARCHDIR = sim + +nps.CFLAGS += -DSITL -DUSE_NPS +nps.LDFLAGS += -lm -livy $(shell pcre-config --libs) -lgsl -lgslcblas + +# detect system arch and include rt and pthread library only on linux +UNAME_S := $(shell uname -s) +ifeq ($(UNAME_S),Linux) + nps.LDFLAGS += -lrt -pthread +endif + +nps.CFLAGS += -I$(SRC_FIRMWARE) -I$(SRC_BOARD) -I$(PAPARAZZI_SRC)/sw/simulator -I$(PAPARAZZI_SRC)/sw/simulator/nps -I$(PAPARAZZI_HOME)/conf/simulator/nps + +# sdl needed for joystick input +nps.LDFLAGS += $(shell sdl-config --libs) + +# glib is still needed for some components (such as radio input) +nps.CFLAGS += $(shell pkg-config glib-2.0 --cflags) +nps.LDFLAGS += $(shell pkg-config glib-2.0 --libs) + +# +# add the simulator directory to the make searchpath +# +VPATH += $(PAPARAZZI_SRC)/sw/simulator + +NPSDIR = nps +nps.srcs += \ + $(NPSDIR)/nps_random.c \ + $(NPSDIR)/nps_sensors.c \ + $(NPSDIR)/nps_sensors_utils.c \ + $(NPSDIR)/nps_sensor_gyro.c \ + $(NPSDIR)/nps_sensor_accel.c \ + $(NPSDIR)/nps_sensor_mag.c \ + $(NPSDIR)/nps_sensor_baro.c \ + $(NPSDIR)/nps_sensor_sonar.c \ + $(NPSDIR)/nps_sensor_gps.c \ + $(NPSDIR)/nps_sensor_airspeed.c \ + $(NPSDIR)/nps_sensor_temperature.c \ + $(NPSDIR)/nps_sensor_aoa.c \ + $(NPSDIR)/nps_sensor_sideslip.c \ + $(NPSDIR)/nps_electrical.c \ + $(NPSDIR)/nps_atmosphere.c \ + $(NPSDIR)/nps_ivy.c \ + $(NPSDIR)/nps_flightgear.c \ + $(NPSDIR)/nps_radio_control.c \ + $(NPSDIR)/nps_radio_control_joystick.c \ + $(NPSDIR)/nps_radio_control_spektrum.c \ + $(NPSDIR)/nps_main_common.c + +# for geo mag calculation +nps.srcs += math/pprz_geodetic_wmm2015.c + diff --git a/conf/firmwares/subsystems/shared/nps_sitl.makefile b/conf/firmwares/subsystems/shared/nps_sitl.makefile deleted file mode 100644 index d851b721769..00000000000 --- a/conf/firmwares/subsystems/shared/nps_sitl.makefile +++ /dev/null @@ -1,13 +0,0 @@ -# Hey Emacs, this is a -*- makefile -*- - -# -# NPS SITL Simulator -# -# SITL specific makefile -# - -# glib is still needed for some components (such as radio input) -nps.CFLAGS += $(shell pkg-config glib-2.0 --cflags) -nps.LDFLAGS += $(shell pkg-config glib-2.0 --libs) - -nps.srcs += $(NPSDIR)/nps_main_sitl.c diff --git a/conf/firmwares/subsystems/shared/uart.makefile b/conf/firmwares/subsystems/shared/uart.makefile index ae19239380e..44ad819437b 100644 --- a/conf/firmwares/subsystems/shared/uart.makefile +++ b/conf/firmwares/subsystems/shared/uart.makefile @@ -12,6 +12,10 @@ ifeq ($(TARGET), nps) UART_CFLAGS += -Iarch/linux UART_SRCS += arch/linux/serial_port.c endif +ifeq ($(TARGET), hitl) +UART_CFLAGS += -Iarch/linux +UART_SRCS += arch/linux/serial_port.c +endif ifeq ($(TARGET), sim) UART_CFLAGS += -Iarch/linux UART_SRCS += arch/linux/serial_port.c diff --git a/conf/firmwares/subsystems/shared/udp.makefile b/conf/firmwares/subsystems/shared/udp.makefile index f8980d7431c..51837930ec4 100644 --- a/conf/firmwares/subsystems/shared/udp.makefile +++ b/conf/firmwares/subsystems/shared/udp.makefile @@ -13,6 +13,10 @@ ifeq ($(TARGET), nps) UDP_CFLAGS += -Iarch/linux UDP_SRCS += arch/linux/udp_socket.c endif +ifeq ($(TARGET), hitl) +UDP_CFLAGS += -Iarch/linux +UDP_SRCS += arch/linux/udp_socket.c +endif $(TARGET).CFLAGS += $(UDP_CFLAGS) $(TARGET).srcs += $(UDP_SRCS) diff --git a/conf/modules/fdm_jsbsim.xml b/conf/modules/fdm_jsbsim.xml index d282fb2458e..032ba956478 100644 --- a/conf/modules/fdm_jsbsim.xml +++ b/conf/modules/fdm_jsbsim.xml @@ -14,7 +14,7 @@
- + diff --git a/conf/modules/gps_nps.xml b/conf/modules/gps_nps.xml index 08fac6a95fa..1e053f4c677 100644 --- a/conf/modules/gps_nps.xml +++ b/conf/modules/gps_nps.xml @@ -14,7 +14,7 @@
- + diff --git a/conf/modules/guidance_basic_fw.xml b/conf/modules/guidance_basic_fw.xml index a10b9c5ae4e..de78e7c82fa 100644 --- a/conf/modules/guidance_basic_fw.xml +++ b/conf/modules/guidance_basic_fw.xml @@ -50,7 +50,7 @@ - + diff --git a/conf/modules/guidance_rotorcraft.xml b/conf/modules/guidance_rotorcraft.xml index 9a74073c2bf..fd3f42c44e3 100644 --- a/conf/modules/guidance_rotorcraft.xml +++ b/conf/modules/guidance_rotorcraft.xml @@ -56,7 +56,7 @@ - + diff --git a/conf/modules/imu_aspirin_v2.2.xml b/conf/modules/imu_aspirin_v2.2.xml index d4859822ebc..cf647aea009 100644 --- a/conf/modules/imu_aspirin_v2.2.xml +++ b/conf/modules/imu_aspirin_v2.2.xml @@ -11,7 +11,7 @@ - + diff --git a/conf/modules/imu_aspirin_v2_common.xml b/conf/modules/imu_aspirin_v2_common.xml index 3edb2191c02..a3fb47ecbc1 100644 --- a/conf/modules/imu_aspirin_v2_common.xml +++ b/conf/modules/imu_aspirin_v2_common.xml @@ -28,7 +28,7 @@ - + diff --git a/conf/modules/imu_nps.xml b/conf/modules/imu_nps.xml index 729dcb7d405..a6501e2f340 100644 --- a/conf/modules/imu_nps.xml +++ b/conf/modules/imu_nps.xml @@ -13,7 +13,7 @@ - + diff --git a/conf/modules/ins.xml b/conf/modules/ins.xml index f2a2e462570..e5a5e45458a 100644 --- a/conf/modules/ins.xml +++ b/conf/modules/ins.xml @@ -15,7 +15,7 @@ - + diff --git a/conf/modules/ins_nps.xml b/conf/modules/ins_nps.xml index 018211ea7d4..b4882e49d34 100644 --- a/conf/modules/ins_nps.xml +++ b/conf/modules/ins_nps.xml @@ -11,7 +11,7 @@ - + @@ -21,12 +21,12 @@ - + - + diff --git a/conf/modules/ins_vectornav.xml b/conf/modules/ins_vectornav.xml index ad4e93b8f8a..aaee09f62f5 100644 --- a/conf/modules/ins_vectornav.xml +++ b/conf/modules/ins_vectornav.xml @@ -51,9 +51,8 @@ + +
diff --git a/conf/modules/nav_basic_fw.xml b/conf/modules/nav_basic_fw.xml index 7d7b13c71cc..0695c9c0e0b 100644 --- a/conf/modules/nav_basic_fw.xml +++ b/conf/modules/nav_basic_fw.xml @@ -27,7 +27,7 @@ - + diff --git a/conf/modules/nav_basic_rotorcraft.xml b/conf/modules/nav_basic_rotorcraft.xml index a67f8fb55a9..302eea5f6b2 100644 --- a/conf/modules/nav_basic_rotorcraft.xml +++ b/conf/modules/nav_basic_rotorcraft.xml @@ -22,7 +22,7 @@ - + diff --git a/conf/modules/nav_flower.xml b/conf/modules/nav_flower.xml index 59c98b7cfa2..710f2fef8a7 100644 --- a/conf/modules/nav_flower.xml +++ b/conf/modules/nav_flower.xml @@ -9,7 +9,7 @@
- +
diff --git a/conf/modules/nav_launcher.xml b/conf/modules/nav_launcher.xml index e814f59ffec..2851398ba92 100644 --- a/conf/modules/nav_launcher.xml +++ b/conf/modules/nav_launcher.xml @@ -15,7 +15,7 @@
- +
diff --git a/conf/modules/nav_line.xml b/conf/modules/nav_line.xml index 681c62c614d..0cc685a070c 100644 --- a/conf/modules/nav_line.xml +++ b/conf/modules/nav_line.xml @@ -14,7 +14,7 @@
- +
diff --git a/conf/modules/nav_skid_landing.xml b/conf/modules/nav_skid_landing.xml index 586f3a74e63..a6a30307a6e 100644 --- a/conf/modules/nav_skid_landing.xml +++ b/conf/modules/nav_skid_landing.xml @@ -52,7 +52,7 @@
- + diff --git a/conf/modules/nav_survey_poly_osam.xml b/conf/modules/nav_survey_poly_osam.xml index be10b37bfcd..f8df4170194 100644 --- a/conf/modules/nav_survey_poly_osam.xml +++ b/conf/modules/nav_survey_poly_osam.xml @@ -30,7 +30,7 @@ You can use:
- +
diff --git a/conf/modules/navigation.xml b/conf/modules/navigation.xml index 5dab400b4ba..f3382e22982 100644 --- a/conf/modules/navigation.xml +++ b/conf/modules/navigation.xml @@ -7,5 +7,5 @@ - +
diff --git a/conf/modules/nps.xml b/conf/modules/nps.xml index e7b6ca0dffd..3da3aa5cb3a 100644 --- a/conf/modules/nps.xml +++ b/conf/modules/nps.xml @@ -12,10 +12,8 @@
- - + - @@ -67,10 +65,13 @@ - + + + - + + @@ -80,12 +81,13 @@ - + - + + - + diff --git a/conf/modules/radio_control_spektrum.xml b/conf/modules/radio_control_spektrum.xml index 74c00291d76..28b2367064e 100644 --- a/conf/modules/radio_control_spektrum.xml +++ b/conf/modules/radio_control_spektrum.xml @@ -16,7 +16,7 @@
- + @@ -29,7 +29,7 @@ endif - + diff --git a/conf/modules/stabilization_attitude_fw.xml b/conf/modules/stabilization_attitude_fw.xml index 5a043801665..77fe73655bc 100644 --- a/conf/modules/stabilization_attitude_fw.xml +++ b/conf/modules/stabilization_attitude_fw.xml @@ -50,7 +50,7 @@
- + diff --git a/conf/modules/stabilization_float_euler.xml b/conf/modules/stabilization_float_euler.xml index ca0bfc16b19..5121cf7f0e2 100644 --- a/conf/modules/stabilization_float_euler.xml +++ b/conf/modules/stabilization_float_euler.xml @@ -63,7 +63,7 @@ - + diff --git a/conf/modules/stabilization_rotorcraft.xml b/conf/modules/stabilization_rotorcraft.xml index 195838c373e..17a097312b6 100644 --- a/conf/modules/stabilization_rotorcraft.xml +++ b/conf/modules/stabilization_rotorcraft.xml @@ -15,7 +15,7 @@ - + diff --git a/conf/modules/telemetry_nps.xml b/conf/modules/telemetry_nps.xml index b82f5a61794..7c878b8c4ba 100644 --- a/conf/modules/telemetry_nps.xml +++ b/conf/modules/telemetry_nps.xml @@ -18,7 +18,7 @@ - + @@ -43,12 +43,12 @@ include $(CFG_SHARED)/udp.makefile - + - + diff --git a/conf/modules/telemetry_transparent.xml b/conf/modules/telemetry_transparent.xml index 3aeb9393466..9a67b26d53c 100644 --- a/conf/modules/telemetry_transparent.xml +++ b/conf/modules/telemetry_transparent.xml @@ -17,7 +17,7 @@ - + diff --git a/conf/settings/nps.xml b/conf/settings/nps.xml index e0edf4bec37..f306cc3a780 100644 --- a/conf/settings/nps.xml +++ b/conf/settings/nps.xml @@ -1,6 +1,6 @@ - + diff --git a/sw/lib/ocaml/env.ml b/sw/lib/ocaml/env.ml index bcd2f5bec4d..c09f5feac7e 100644 --- a/sw/lib/ocaml/env.ml +++ b/sw/lib/ocaml/env.ml @@ -72,7 +72,7 @@ let get_gcs_icon_path = fun theme icon -> let dump_fp = paparazzi_src // "sw" // "tools" // "generators" // "gen_flight_plan.out -dump" -let default_module_targets = "ap|sim|nps" +let default_module_targets = "ap|sim|nps|hitl" let filter_absolute_path = fun path -> Str.replace_first (Str.regexp (paparazzi_home // "conf/")) "" path diff --git a/sw/simulator/pprzsim-launch b/sw/simulator/pprzsim-launch index 7ab09c628d7..1e98b2e02a6 100755 --- a/sw/simulator/pprzsim-launch +++ b/sw/simulator/pprzsim-launch @@ -39,7 +39,7 @@ def main(): action="store", metavar="NAME", help="Aircraft name to use") parser.add_option("-t", "--type", dest="simtype", - type='choice', choices=['sim', 'nps'], + type='choice', choices=['sim', 'nps','hitl'], action="store", default=None, help="Simulator type to start: sim or nps") parser.add_option("-b", "--ivy_bus", dest="ivy_bus", action="store", @@ -134,7 +134,7 @@ def main(): if options.fg_host: simargs.append("-fg") simargs.append(options.fg_host) - elif options.simtype == "nps": + elif (options.simtype == "nps") or (options.simtype == "hitl"): if options.fg_host: simargs.append("--fg_host") simargs.append(options.fg_host)