diff --git a/conf/airframes/mm/fixed-wing/drops.xml b/conf/airframes/mm/fixed-wing/drops.xml
new file mode 100644
index 0000000000..9c64039a93
--- /dev/null
+++ b/conf/airframes/mm/fixed-wing/drops.xml
@@ -0,0 +1,284 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+CONFIG = \"tiny_2_1.h\"
+
+include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
+
+FLASH_MODE=IAP
+
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
+
+ap.srcs += commands.c
+
+ap.CFLAGS += -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017
+ap.srcs += $(SRC_ARCH)/servos_4017_hw.c actuators.c
+
+ap.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_AUTO1
+ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
+
+ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
+ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+
+#TRANSPARENT
+#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
+#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+
+ap.CFLAGS += -DINTER_MCU
+ap.srcs += inter_mcu.c
+
+ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3
+ap.srcs += $(SRC_ARCH)/adc_hw.c
+
+ap.CFLAGS += -DGYRO -DADXRS150
+ap.srcs += gyro.c
+
+ap.CFLAGS += -DGPS -DUBX -DUSE_UART0 -DGPS_LINK=Uart0 -DUART0_BAUD=B38400 -DGPS_USE_LATLONG
+# -DGPS_LED=2
+ap.srcs += gps_ubx.c gps.c latlong.c
+
+ap.CFLAGS += -DINFRARED -DALT_KALMAN -DWIND_INFO -DWIND_INFO_RET
+ap.srcs += infrared.c estimator.c
+
+ap.CFLAGS += -DNAV -DAGR_CLIMB -DLOITER_TRIM
+ap.srcs += nav.c fw_h_ctl_a.c fw_v_ctl.c
+
+ap.srcs += nav_line.c
+ap.srcs += nav_survey_rectangle.c
+
+ap.srcs += bomb.c
+
+ap.srcs += snav.c
+
+# Config for SITL simulation
+# include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
+sim.ARCHDIR = $(ARCHI)
+sim.ARCH = sitl
+sim.TARGET = autopilot
+sim.TARGETDIR = autopilot
+sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DINFRARED -DNAV -DLED -DWIND_INFO
+sim.srcs = latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl_a.c fw_v_ctl.c nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c
+
+sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
+sim.srcs += nav_line.c nav_survey_rectangle.c
+
+sim.srcs += bomb.c
+
+
+
diff --git a/conf/airframes/mm/fixed-wing/funjeteth2.xml b/conf/airframes/mm/fixed-wing/funjeteth2.xml
index 3e3de5edfc..e97aa831b0 100644
--- a/conf/airframes/mm/fixed-wing/funjeteth2.xml
+++ b/conf/airframes/mm/fixed-wing/funjeteth2.xml
@@ -74,7 +74,7 @@
-
+
@@ -99,6 +99,7 @@
+
@@ -132,7 +133,7 @@
-
+
@@ -228,7 +229,8 @@ ap.srcs += inter_mcu.c
ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_6
ap.srcs += $(SRC_ARCH)/adc_hw.c
-ap.CFLAGS += -DGPS -DUBX -DUSE_UART0 -DGPS_LINK=Uart0 -DUART0_BAUD=B38400 -DGPS_USE_LATLONG
+ap.CFLAGS += -DGPS -DUBX -DUSE_UART0 -DGPS_LINK=Uart0 -DUART0_BAUD=B38400
+# -DGPS_USE_LATLONG
# -DGPS_LED=2
ap.srcs += gps_ubx.c gps.c latlong.c
diff --git a/conf/airframes/obsolete/funjetfmi1.xml b/conf/airframes/mm/fixed-wing/funjetfmi1.xml
similarity index 100%
rename from conf/airframes/obsolete/funjetfmi1.xml
rename to conf/airframes/mm/fixed-wing/funjetfmi1.xml
diff --git a/conf/airframes/obsolete/funjetgfi1.xml b/conf/airframes/mm/fixed-wing/funjetgfi1.xml
similarity index 100%
rename from conf/airframes/obsolete/funjetgfi1.xml
rename to conf/airframes/mm/fixed-wing/funjetgfi1.xml
diff --git a/conf/airframes/obsolete/funjetgfi3.xml b/conf/airframes/mm/fixed-wing/funjetgfi3.xml
similarity index 100%
rename from conf/airframes/obsolete/funjetgfi3.xml
rename to conf/airframes/mm/fixed-wing/funjetgfi3.xml
diff --git a/conf/airframes/obsolete/funjetgfi4.xml b/conf/airframes/mm/fixed-wing/funjetgfi4.xml
similarity index 100%
rename from conf/airframes/obsolete/funjetgfi4.xml
rename to conf/airframes/mm/fixed-wing/funjetgfi4.xml
diff --git a/conf/airframes/obsolete/funjetgfi5.xml b/conf/airframes/mm/fixed-wing/funjetgfi5.xml
similarity index 100%
rename from conf/airframes/obsolete/funjetgfi5.xml
rename to conf/airframes/mm/fixed-wing/funjetgfi5.xml
diff --git a/conf/airframes/obsolete/funjetgfi6.xml b/conf/airframes/mm/fixed-wing/funjetgfi6.xml
similarity index 100%
rename from conf/airframes/obsolete/funjetgfi6.xml
rename to conf/airframes/mm/fixed-wing/funjetgfi6.xml
diff --git a/conf/airframes/obsolete/funjetgfi7.xml b/conf/airframes/mm/fixed-wing/funjetgfi7.xml
similarity index 100%
rename from conf/airframes/obsolete/funjetgfi7.xml
rename to conf/airframes/mm/fixed-wing/funjetgfi7.xml
diff --git a/conf/airframes/obsolete/funjetgfi8.xml b/conf/airframes/mm/fixed-wing/funjetgfi8.xml
similarity index 100%
rename from conf/airframes/obsolete/funjetgfi8.xml
rename to conf/airframes/mm/fixed-wing/funjetgfi8.xml
diff --git a/conf/airframes/obsolete/funjetgfi9.xml b/conf/airframes/mm/fixed-wing/funjetgfi9.xml
similarity index 100%
rename from conf/airframes/obsolete/funjetgfi9.xml
rename to conf/airframes/mm/fixed-wing/funjetgfi9.xml
diff --git a/conf/airframes/mm/fixed-wing/funjetmm.xml b/conf/airframes/mm/fixed-wing/funjetmm.xml
index 620814de0a..7eb6bb6c9a 100755
--- a/conf/airframes/mm/fixed-wing/funjetmm.xml
+++ b/conf/airframes/mm/fixed-wing/funjetmm.xml
@@ -2,16 +2,65 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -176,108 +225,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-CONFIG = \"tiny_2_1.h\"
-
-include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
-
-FLASH_MODE=IAP
-
-ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
-ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
-
-ap.srcs += commands.c
-
-ap.CFLAGS += -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017
-ap.srcs += $(SRC_ARCH)/servos_4017_hw.c actuators.c
-
-ap.CFLAGS += -DRADIO_CONTROL
-ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
-
-ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
-ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
-
-#TRANSPARENT
-#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
-#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
-
-
-ap.CFLAGS += -DINTER_MCU
-ap.srcs += inter_mcu.c
-
-ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_4
-ap.srcs += $(SRC_ARCH)/adc_hw.c
-
-ap.CFLAGS += -DGPS -DUBX -DUSE_UART0 -DGPS_LINK=Uart0 -DUART0_BAUD=B38400 -DGPS_USE_LATLONG
-# -DGPS_LED=2
-ap.srcs += gps_ubx.c gps.c latlong.c
-
-ap.CFLAGS += -DINFRARED -DALT_KALMAN -DWIND_INFO -DWIND_INFO_RET
-ap.srcs += infrared.c estimator.c
-
-ap.CFLAGS += -DNAV -DAGR_CLIMB -DLOITER_TRIM
-ap.srcs += nav.c fw_h_ctl.c fw_v_ctl.c
-
-ap.srcs += nav_line.c
-ap.srcs += nav_survey_rectangle.c
-
-ap.srcs += humid_sht.c
-ap.CFLAGS += -DUSE_HUMID_SHT -DDAT_PIN=30 -DSCK_PIN=4
-
-#ap.srcs += baro_scp.c
-#ap.CFLAGS += -DUSE_BARO_SCP
-
-ap.CFLAGS += -DMICROMAG_DRDY_VIC_SLOT=9 -DSSP_VIC_SLOT=11 -DUSE_MICROMAG_FW
-ap.srcs += micromag_fw.c $(SRC_ARCH)/micromag_fw_hw.c
-
-# EagleTree airspeed sensor
-ap.CFLAGS += -DUSE_AIRSPEED_ETS -DUSE_I2C0
-ap.srcs += airspeed_ets.c i2c.c $(SRC_ARCH)/i2c_hw.c
-
-ap.srcs += bomb.c
-
-ap.srcs += snav.c
-
-# distance sensor
-ap.CFLAGS += -DUSE_ADC_3 -DUSE_ADC_GENERIC -DADC_CHANNEL_GENERIC1=ADC_3 -DADC_CHANNEL_GENERIC_NB_SAMPLES=16
-ap.srcs += adc_generic.c
-
-# Config for SITL simulation
-include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
-sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
-sim.srcs += nav_line.c nav_survey_rectangle.c
-
-sim.srcs += bomb.c
-
-
-
diff --git a/conf/airframes/mm/fixed-wing/funjetmm2.xml b/conf/airframes/mm/fixed-wing/funjetmm2.xml
new file mode 100644
index 0000000000..835eaaaef4
--- /dev/null
+++ b/conf/airframes/mm/fixed-wing/funjetmm2.xml
@@ -0,0 +1,274 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+CONFIG = \"tiny_2_1.h\"
+
+include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
+
+FLASH_MODE=IAP
+
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
+
+ap.srcs += commands.c
+
+ap.CFLAGS += -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017
+ap.srcs += $(SRC_ARCH)/servos_4017_hw.c actuators.c
+
+ap.CFLAGS += -DRADIO_CONTROL
+ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
+
+ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
+ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+
+#TRANSPARENT
+#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
+#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+
+
+ap.CFLAGS += -DINTER_MCU
+ap.srcs += inter_mcu.c
+
+ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_4
+ap.srcs += $(SRC_ARCH)/adc_hw.c
+
+ap.CFLAGS += -DGPS -DUBX -DUSE_UART0 -DGPS_LINK=Uart0 -DUART0_BAUD=B38400
+# -DGPS_USE_LATLONG
+# -DGPS_LED=2
+ap.srcs += gps_ubx.c gps.c latlong.c
+
+ap.CFLAGS += -DINFRARED -DALT_KALMAN -DWIND_INFO -DWIND_INFO_RET
+ap.srcs += infrared.c estimator.c
+
+ap.CFLAGS += -DNAV -DAGR_CLIMB -DLOITER_TRIM
+ap.srcs += nav.c fw_h_ctl.c fw_v_ctl.c
+
+ap.srcs += nav_line.c
+ap.srcs += nav_survey_rectangle.c
+
+ap.srcs += humid_sht.c
+ap.CFLAGS += -DUSE_HUMID_SHT -DDAT_PIN=30 -DSCK_PIN=4
+
+ap.srcs += bomb.c
+
+ap.srcs += snav.c
+
+# distance sensor
+ap.CFLAGS += -DUSE_ADC_3 -DUSE_ADC_GENERIC -DADC_CHANNEL_GENERIC1=ADC_3 -DADC_CHANNEL_GENERIC_NB_SAMPLES=16
+ap.srcs += adc_generic.c
+
+# Config for SITL simulation
+include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
+sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
+sim.srcs += nav_line.c nav_survey_rectangle.c
+
+sim.srcs += bomb.c
+
+
+
+
diff --git a/conf/airframes/obsolete/miniwing.xml b/conf/airframes/mm/fixed-wing/slowfast.xml
similarity index 58%
rename from conf/airframes/obsolete/miniwing.xml
rename to conf/airframes/mm/fixed-wing/slowfast.xml
index e1c36ddb58..289aec997e 100644
--- a/conf/airframes/obsolete/miniwing.xml
+++ b/conf/airframes/mm/fixed-wing/slowfast.xml
@@ -1,31 +1,32 @@
-
+
-
-
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
-
-
+
+
+
+
@@ -51,6 +52,8 @@
+
+
@@ -70,49 +73,63 @@
-
+
-
+
+
+
+
-
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
@@ -125,20 +142,20 @@
-
-
+
+
-
+
-
-
+
+
-
+
-
+
+
@@ -160,12 +177,21 @@
+
+
@@ -186,16 +212,21 @@ ap.srcs += commands.c
ap.CFLAGS += -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017
ap.srcs += $(SRC_ARCH)/servos_4017_hw.c actuators.c
-ap.CFLAGS += -DRADIO_CONTROL -DUSE_RC_TELEMETRY
-ap.srcs += radio_control.c ppm_telemetry.c
+ap.CFLAGS += -DRADIO_CONTROL
+ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
-ap.CFLAGS += -DINTER_MCU
-ap.srcs += inter_mcu.c
+#TRANSPARENT
+#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
+#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
-ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2
+
+ap.CFLAGS += -DINTER_MCU
+ap.srcs += inter_mcu.c
+
+ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3
ap.srcs += $(SRC_ARCH)/adc_hw.c
ap.CFLAGS += -DGPS -DUBX -DUSE_UART0 -DGPS_LINK=Uart0 -DUART0_BAUD=B38400 -DGPS_USE_LATLONG
@@ -210,8 +241,10 @@ ap.srcs += nav.c fw_h_ctl.c fw_v_ctl.c
ap.srcs += nav_line.c
ap.srcs += nav_survey_rectangle.c
+ap.srcs += snav.c
-ap.CFLAGS += -DTELEMETRY_MODE_FBW=1
+ap.CFLAGS += -DGYRO -DADXRS150
+ap.srcs += gyro.c
# Config for SITL simulation
include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
diff --git a/conf/airframes/mm/fixed-wing/slowfast2.xml b/conf/airframes/mm/fixed-wing/slowfast2.xml
new file mode 100644
index 0000000000..e5797812a4
--- /dev/null
+++ b/conf/airframes/mm/fixed-wing/slowfast2.xml
@@ -0,0 +1,255 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+CONFIG = \"tiny_2_1.h\"
+
+include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile
+
+FLASH_MODE=IAP
+
+ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1
+ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c
+
+ap.srcs += commands.c
+
+ap.CFLAGS += -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017
+ap.srcs += $(SRC_ARCH)/servos_4017_hw.c actuators.c
+
+ap.CFLAGS += -DRADIO_CONTROL
+ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
+
+ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B57600
+ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c
+
+#TRANSPARENT
+#ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
+#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c
+
+
+ap.CFLAGS += -DINTER_MCU
+ap.srcs += inter_mcu.c
+
+ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3
+ap.srcs += $(SRC_ARCH)/adc_hw.c
+
+ap.CFLAGS += -DGPS -DUBX -DUSE_UART0 -DGPS_LINK=Uart0 -DUART0_BAUD=B38400 -DGPS_USE_LATLONG
+# -DGPS_LED=2
+ap.srcs += gps_ubx.c gps.c latlong.c
+
+ap.CFLAGS += -DINFRARED -DALT_KALMAN -DWIND_INFO -DWIND_INFO_RET
+ap.srcs += infrared.c estimator.c
+
+ap.CFLAGS += -DNAV -DAGR_CLIMB -DLOITER_TRIM
+ap.srcs += nav.c fw_h_ctl.c fw_v_ctl.c
+
+ap.srcs += nav_line.c
+ap.srcs += nav_survey_rectangle.c
+ap.srcs += snav.c
+
+ap.CFLAGS += -DGYRO -DADXRS150
+ap.srcs += gyro.c
+
+# Config for SITL simulation
+include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
+sim.CFLAGS += -DBOARD_CONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN
+sim.srcs += nav_line.c nav_survey_rectangle.c
+
+
+
diff --git a/conf/airframes/obsolete/twinstarmm.xml b/conf/airframes/mm/fixed-wing/twinstarmm.xml
similarity index 100%
rename from conf/airframes/obsolete/twinstarmm.xml
rename to conf/airframes/mm/fixed-wing/twinstarmm.xml
diff --git a/conf/airframes/obsolete/black_one.xml b/conf/airframes/mm/hangar/black_one.xml
similarity index 100%
rename from conf/airframes/obsolete/black_one.xml
rename to conf/airframes/mm/hangar/black_one.xml
diff --git a/conf/airframes/obsolete/glass_one1.xml b/conf/airframes/mm/hangar/glass_one1.xml
similarity index 100%
rename from conf/airframes/obsolete/glass_one1.xml
rename to conf/airframes/mm/hangar/glass_one1.xml
diff --git a/conf/airframes/obsolete/glass_one2.xml b/conf/airframes/mm/hangar/glass_one2.xml
similarity index 100%
rename from conf/airframes/obsolete/glass_one2.xml
rename to conf/airframes/mm/hangar/glass_one2.xml
diff --git a/conf/airframes/obsolete/glass_one3.xml b/conf/airframes/mm/hangar/glass_one3.xml
similarity index 100%
rename from conf/airframes/obsolete/glass_one3.xml
rename to conf/airframes/mm/hangar/glass_one3.xml
diff --git a/conf/airframes/obsolete/lila.xml b/conf/airframes/mm/hangar/lila.xml
similarity index 100%
rename from conf/airframes/obsolete/lila.xml
rename to conf/airframes/mm/hangar/lila.xml
diff --git a/conf/airframes/obsolete/mac06a.xml b/conf/airframes/mm/hangar/mac06a.xml
similarity index 100%
rename from conf/airframes/obsolete/mac06a.xml
rename to conf/airframes/mm/hangar/mac06a.xml
diff --git a/conf/airframes/obsolete/red_one.xml b/conf/airframes/mm/hangar/red_one.xml
similarity index 100%
rename from conf/airframes/obsolete/red_one.xml
rename to conf/airframes/mm/hangar/red_one.xml
diff --git a/conf/modules/baro_scp.xml b/conf/modules/baro_scp.xml
new file mode 100644
index 0000000000..6e7f9d18ea
--- /dev/null
+++ b/conf/modules/baro_scp.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/modules/baro_scp_i2c.xml b/conf/modules/baro_scp_i2c.xml
new file mode 100644
index 0000000000..42bcbe48fd
--- /dev/null
+++ b/conf/modules/baro_scp_i2c.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/modules/humid_dpicco.xml b/conf/modules/humid_dpicco.xml
new file mode 100644
index 0000000000..58da27f7eb
--- /dev/null
+++ b/conf/modules/humid_dpicco.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/modules/humid_sht.xml b/conf/modules/humid_sht.xml
new file mode 100644
index 0000000000..5a274a2ade
--- /dev/null
+++ b/conf/modules/humid_sht.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/radios/mc24r.xml b/conf/radios/mc24r.xml
new file mode 100644
index 0000000000..05b3bb7e1a
--- /dev/null
+++ b/conf/radios/mc24r.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sw/airborne/baro_scp_i2c.c b/sw/airborne/baro_scp_i2c.c
deleted file mode 100644
index a2e813b9bb..0000000000
--- a/sw/airborne/baro_scp_i2c.c
+++ /dev/null
@@ -1,101 +0,0 @@
-
-/** \file baro_scp_i2c.c
- * \brief VTI SCP1000 I2C sensor interface
- *
- * This reads the values for pressure and temperature from the VTI SCP1000 sensor through I2C.
- */
-
-
-#include "baro_scp_i2c.h"
-
-#include "sys_time.h"
-#include "i2c.h"
-#include "led.h"
-
-#include
-
-uint8_t baro_scp_status;
-uint32_t baro_scp_pressure;
-uint16_t baro_scp_temperature;
-bool_t baro_scp_available;
-volatile bool_t baro_scp_i2c_done;
-
-#define SCP1000_SLAVE_ADDR 0x22
-
-
-static void baro_scp_start_high_res_measurement(void) {
- /* write 0x0A to 0x03 */
- i2c0_buf[0] = 0x03;
- i2c0_buf[1] = 0x0A;
- i2c0_transmit(SCP1000_SLAVE_ADDR, 2, &baro_scp_i2c_done);
-}
-
-void baro_scp_init( void ) {
- baro_scp_status = BARO_SCP_UNINIT;
- baro_scp_i2c_done = FALSE;
-}
-
-void baro_scp_periodic( void ) {
- if (baro_scp_status == BARO_SCP_UNINIT && cpu_time_sec > 1) {
- baro_scp_start_high_res_measurement();
- baro_scp_status = BARO_SCP_IDLE;
- } else if (baro_scp_i2c_done) {
- if (baro_scp_status == BARO_SCP_IDLE) {
-
- /* initial measurement */
-
- /* start two byte temperature */
- i2c0_buf[0] = 0x81;
- baro_scp_status = BARO_SCP_RD_TEMP;
- baro_scp_i2c_done = FALSE;
- i2c0_transceive(SCP1000_SLAVE_ADDR, 1, 2, &baro_scp_i2c_done);
-//LED_ON(2);
- }
-
- else if (baro_scp_status == BARO_SCP_RD_TEMP) {
-
- /* read two byte temperature */
- baro_scp_temperature = i2c0_buf[0] << 8;
- baro_scp_temperature |= i2c0_buf[1];
- if (baro_scp_temperature & 0x2000) {
- baro_scp_temperature |= 0xC000;
- }
- baro_scp_temperature *= 5;
-
- /* start one byte msb pressure */
- i2c0_buf[0] = 0x7F;
- baro_scp_status = BARO_SCP_RD_PRESS_0;
- baro_scp_i2c_done = FALSE;
- i2c0_transceive(SCP1000_SLAVE_ADDR, 1, 1, &baro_scp_i2c_done);
- }
-
- else if (baro_scp_status == BARO_SCP_RD_PRESS_0) {
-
- /* read one byte pressure */
- baro_scp_pressure = i2c0_buf[0] << 16;
-
- /* start two byte lsb pressure */
- i2c0_buf[0] = 0x80;
- baro_scp_status = BARO_SCP_RD_PRESS_1;
- baro_scp_i2c_done = FALSE;
- i2c0_transceive(SCP1000_SLAVE_ADDR, 1, 2, &baro_scp_i2c_done);
- }
-
- else if (baro_scp_status == BARO_SCP_RD_PRESS_1) {
-
- /* read two byte pressure */
- baro_scp_pressure |= i2c0_buf[0] << 8;
- baro_scp_pressure |= i2c0_buf[1];
- baro_scp_pressure *= 25;
- baro_scp_available = TRUE;
-//LED_TOGGLE(2);
-
- /* start two byte temperature */
- i2c0_buf[0] = 0x81;
- baro_scp_status = BARO_SCP_RD_TEMP;
- baro_scp_i2c_done = FALSE;
- i2c0_transceive(SCP1000_SLAVE_ADDR, 1, 2, &baro_scp_i2c_done);
- }
- }
-}
-
diff --git a/sw/airborne/dpicco.c b/sw/airborne/dpicco.c
deleted file mode 100644
index 0ec312e11c..0000000000
--- a/sw/airborne/dpicco.c
+++ /dev/null
@@ -1,59 +0,0 @@
-
-/** \file dpicco.c
- * \brief DigiPicco I2C sensor interface
- *
- * This reads the values for humidity and temperature from the IST DigiPicco sensor through I2C.
- */
-
-
-#include "dpicco.h"
-
-#include "i2c.h"
-#include "led.h"
-
-#include
-
-uint8_t dpicco_status;
-
-uint16_t dpicco_val[DPICCO_NB_SENSOR];
-
-float dpicco_humid;
-float dpicco_temp;
-
-#define DPICCO_SLAVE_ADDR 0xF0
-
-
-volatile bool_t dpicco_i2c_done;
-
-void dpicco_init( void ) {
- uint8_t i;
- for (i=0; i< DPICCO_NB_SENSOR; i++) {
- dpicco_val[i] = 0;
- }
- dpicco_status = DPICCO_IDLE;
- dpicco_i2c_done = TRUE;
-}
-
-void dpicco_periodic( void ) {
- if (dpicco_i2c_done) {
- if (dpicco_status == DPICCO_IDLE) {
- /* init first read */
- dpicco_status = DPICCO_MEASURING_RD;
- dpicco_i2c_done = FALSE;
- i2c0_receive(DPICCO_SLAVE_ADDR, 4, &dpicco_i2c_done);
-
-// LED_ON(2);
- }
- else if (dpicco_status == DPICCO_MEASURING_RD) {
- /* get data */
- dpicco_val[0] = (i2c0_buf[0]<<8) | i2c0_buf[1];
- dpicco_val[1] = (i2c0_buf[2]<<8) | i2c0_buf[3];
-
- /* start next one right away */
- dpicco_i2c_done = FALSE;
- i2c0_receive(DPICCO_SLAVE_ADDR, 4, &dpicco_i2c_done);
-
-// LED_TOGGLE(2);
- }
- }
-}
diff --git a/sw/airborne/main_ap.c b/sw/airborne/main_ap.c
index b674cc4fcd..93d0c3e1d9 100644
--- a/sw/airborne/main_ap.c
+++ b/sw/airborne/main_ap.c
@@ -83,19 +83,6 @@
#include "i2c.h"
#endif
-#ifdef DPICCO
-#include "i2c.h"
-#include "dpicco.h"
-#endif
-
-#ifdef USE_HUMID_SHT
-#include "humid_sht.h"
-#endif
-
-#ifdef USE_BARO_SCP
-#include "baro_scp.h"
-#endif
-
#ifdef USE_SPI
#include "spi.h"
#endif
@@ -522,15 +509,6 @@ void periodic_task_ap( void ) {
break;
#endif
-#ifdef DPICCO
- case 5:
- dpicco_periodic();
- dpicco_humid = (dpicco_val[0] * DPICCO_HUMID_RANGE) / DPICCO_HUMID_MAX;
- dpicco_temp = ((dpicco_val[1] * DPICCO_TEMP_RANGE) / DPICCO_TEMP_MAX) + DPICCO_TEMP_OFFS;
- DOWNLINK_SEND_DPICCO_STATUS(DefaultChannel, &dpicco_val[0], &dpicco_val[1], &dpicco_humid, &dpicco_temp);
- break;
-#endif
-
#ifdef USE_MAX11040
case 5:
{
@@ -577,26 +555,6 @@ void periodic_task_ap( void ) {
break;
#endif
-#ifdef USE_HUMID_SHT
- case 8:
- humid_sht_periodic();
- if (humid_sht_available == TRUE) {
- DOWNLINK_SEND_SHT_STATUS(DefaultChannel, &humidsht, &tempsht, &fhumidsht, &ftempsht);
- humid_sht_available = FALSE;
- }
- break;
-#endif
-
-#ifdef USE_BARO_SCP
- case 9:
- baro_scp_periodic();
- if (baro_scp_available == TRUE) {
- DOWNLINK_SEND_SCP_STATUS(DefaultChannel, &baro_scp_pressure, &baro_scp_temperature);
- baro_scp_available = FALSE;
- }
- break;
-#endif
-
#ifdef TCAS
case 14:
/** tcas altitude control loop at 4Hz just before navigation task */
@@ -749,19 +707,6 @@ void init_ap( void ) {
adc_generic_init();
#endif
-#ifdef DPICCO
- i2c0_init();
- dpicco_init();
-#endif
-
-#ifdef USE_HUMID_SHT
- humid_sht_init();
-#endif
-
-#ifdef USE_BARO_SCP
- baro_scp_init();
-#endif
-
/************* Links initialization ***************/
#if defined USE_SPI
spi_init();
diff --git a/sw/airborne/baro_scp.c b/sw/airborne/modules/meteo/baro_scp.c
similarity index 96%
rename from sw/airborne/baro_scp.c
rename to sw/airborne/modules/meteo/baro_scp.c
index 0c05c60d96..b24f6aa7ec 100644
--- a/sw/airborne/baro_scp.c
+++ b/sw/airborne/modules/meteo/baro_scp.c
@@ -168,3 +168,11 @@ static void baro_scp_read(void) {
SSPDR = 0;
SpiEnable();
}
+
+void baro_scp_event( void ) {
+ if (baro_scp_available == TRUE) {
+ DOWNLINK_SEND_SCP_STATUS(DefaultChannel, &baro_scp_pressure, &baro_scp_temperature);
+ baro_scp_available = FALSE;
+ }
+}
+
diff --git a/sw/airborne/baro_scp.h b/sw/airborne/modules/meteo/baro_scp.h
similarity index 89%
rename from sw/airborne/baro_scp.h
rename to sw/airborne/modules/meteo/baro_scp.h
index 713ad38ca7..f330f38a3b 100644
--- a/sw/airborne/baro_scp.h
+++ b/sw/airborne/modules/meteo/baro_scp.h
@@ -3,6 +3,10 @@
#include "std.h"
+#ifdef STM32
+#error LPC21_only
+#endif
+
#define STA_UNINIT 0
#define STA_INITIALISING 1
#define STA_IDLE 2
diff --git a/sw/airborne/modules/meteo/baro_scp_i2c.c b/sw/airborne/modules/meteo/baro_scp_i2c.c
new file mode 100644
index 0000000000..64f7250058
--- /dev/null
+++ b/sw/airborne/modules/meteo/baro_scp_i2c.c
@@ -0,0 +1,102 @@
+
+/** \file baro_scp_i2c.c
+ * \brief VTI SCP1000 I2C sensor interface
+ *
+ * This reads the values for pressure and temperature from the VTI SCP1000 sensor through I2C.
+ */
+
+
+#include "baro_scp_i2c.h"
+
+#include "sys_time.h"
+#include "i2c.h"
+#include "led.h"
+#include "uart.h"
+#include "messages.h"
+#include "downlink.h"
+
+uint8_t baro_scp_status;
+uint32_t baro_scp_pressure;
+uint16_t baro_scp_temperature;
+
+struct i2c_transaction scp_trans;
+
+#ifndef SCP_I2C_DEV
+#define SCP_I2C_DEV i2c0
+#endif
+
+#define SCP1000_SLAVE_ADDR 0x22
+
+static void baro_scp_start_high_res_measurement(void) {
+ /* write 0x0A to 0x03 */
+ scp_trans.buf[0] = 0x03;
+ scp_trans.buf[1] = 0x0A;
+ I2CTransmit(SCP_I2C_DEV, scp_trans, SCP1000_SLAVE_ADDR, 2);
+}
+
+void baro_scp_init( void ) {
+ baro_scp_status = BARO_SCP_UNINIT;
+}
+
+void baro_scp_periodic( void ) {
+
+ if (baro_scp_status == BARO_SCP_UNINIT && cpu_time_sec > 1) {
+
+ baro_scp_start_high_res_measurement();
+ baro_scp_status = BARO_SCP_IDLE;
+ } else if (baro_scp_status == BARO_SCP_IDLE) {
+
+ /* init: start two byte temperature */
+ scp_trans.buf[0] = 0x81;
+ baro_scp_status = BARO_SCP_RD_TEMP;
+ I2CTransceive(SCP_I2C_DEV, scp_trans, SCP1000_SLAVE_ADDR, 1, 2);
+ }
+}
+
+void baro_scp_event( void ) {
+
+ if (scp_trans.status == I2CTransSuccess) {
+
+ if (baro_scp_status == BARO_SCP_RD_TEMP) {
+
+ /* read two byte temperature */
+ baro_scp_temperature = scp_trans.buf[0] << 8;
+ baro_scp_temperature |= scp_trans.buf[1];
+ if (baro_scp_temperature & 0x2000) {
+ baro_scp_temperature |= 0xC000;
+ }
+ baro_scp_temperature *= 5;
+
+ /* start one byte msb pressure */
+ scp_trans.buf[0] = 0x7F;
+ baro_scp_status = BARO_SCP_RD_PRESS_0;
+ I2CTransceive(SCP_I2C_DEV, scp_trans, SCP1000_SLAVE_ADDR, 1, 1);
+ }
+
+ else if (baro_scp_status == BARO_SCP_RD_PRESS_0) {
+
+ /* read one byte pressure */
+ baro_scp_pressure = scp_trans.buf[0] << 16;
+
+ /* start two byte lsb pressure */
+ scp_trans.buf[0] = 0x80;
+ baro_scp_status = BARO_SCP_RD_PRESS_1;
+ I2CTransceive(SCP_I2C_DEV, scp_trans, SCP1000_SLAVE_ADDR, 1, 2);
+ }
+
+ else if (baro_scp_status == BARO_SCP_RD_PRESS_1) {
+
+ /* read two byte pressure */
+ baro_scp_pressure |= scp_trans.buf[0] << 8;
+ baro_scp_pressure |= scp_trans.buf[1];
+ baro_scp_pressure *= 25;
+
+ DOWNLINK_SEND_SCP_STATUS(DefaultChannel, &baro_scp_pressure, &baro_scp_temperature);
+
+ baro_scp_status = BARO_SCP_IDLE;
+ }
+
+ else baro_scp_status = BARO_SCP_IDLE;
+ }
+}
+
diff --git a/sw/airborne/baro_scp_i2c.h b/sw/airborne/modules/meteo/baro_scp_i2c.h
similarity index 82%
rename from sw/airborne/baro_scp_i2c.h
rename to sw/airborne/modules/meteo/baro_scp_i2c.h
index b635086e8b..7c911579e2 100644
--- a/sw/airborne/baro_scp_i2c.h
+++ b/sw/airborne/modules/meteo/baro_scp_i2c.h
@@ -12,10 +12,9 @@
extern uint8_t baro_scp_status;
extern uint32_t baro_scp_pressure;
extern uint16_t baro_scp_temperature;
-extern bool_t baro_scp_available;
-extern volatile bool_t baro_scp_i2c_done;
void baro_scp_init(void);
void baro_scp_periodic(void);
+void baro_scp_event(void);
#endif
diff --git a/sw/airborne/modules/meteo/humid_dpicco.c b/sw/airborne/modules/meteo/humid_dpicco.c
new file mode 100644
index 0000000000..2a3dd07569
--- /dev/null
+++ b/sw/airborne/modules/meteo/humid_dpicco.c
@@ -0,0 +1,55 @@
+
+/** \file dpicco.c
+ * \brief DigiPicco I2C sensor interface
+ *
+ * This reads the values for humidity and temperature from the IST DigiPicco sensor through I2C.
+ */
+
+
+#include "humid_dpicco.h"
+
+#include "i2c.h"
+#include "led.h"
+#include "uart.h"
+#include "messages.h"
+#include "downlink.h"
+
+#ifndef DPICCO_I2C_DEV
+#define DPICCO_I2C_DEV i2c0
+#endif
+
+#define DPICCO_SLAVE_ADDR 0xF0
+
+uint16_t dpicco_val[2];
+
+float dpicco_humid;
+float dpicco_temp;
+
+struct i2c_transaction dpicco_trans;
+
+
+void dpicco_init( void ) {
+ dpicco_trans.status = I2CTransDone;
+}
+
+void dpicco_periodic( void ) {
+ /* init read */
+ I2CReceive(DPICCO_I2C_DEV, dpicco_trans, DPICCO_SLAVE_ADDR, 4);
+}
+
+void dpicco_event( void ) {
+
+ if (dpicco_trans.status == I2CTransSuccess) {
+//LED_TOGGLE(2);
+
+ dpicco_val[0] = (dpicco_trans.buf[0]<<8) | dpicco_trans.buf[1];
+ dpicco_val[1] = (dpicco_trans.buf[2]<<8) | dpicco_trans.buf[3];
+
+ dpicco_humid = (dpicco_val[0] * DPICCO_HUMID_RANGE) / DPICCO_HUMID_MAX;
+ dpicco_temp = ((dpicco_val[1] * DPICCO_TEMP_RANGE) / DPICCO_TEMP_MAX) + DPICCO_TEMP_OFFS;
+
+ DOWNLINK_SEND_DPICCO_STATUS(DefaultChannel, &dpicco_val[0], &dpicco_val[1], &dpicco_humid, &dpicco_temp);
+ dpicco_trans.status = I2CTransDone;
+ }
+}
+
diff --git a/sw/airborne/dpicco.h b/sw/airborne/modules/meteo/humid_dpicco.h
similarity index 53%
rename from sw/airborne/dpicco.h
rename to sw/airborne/modules/meteo/humid_dpicco.h
index 0dcbdfe622..7272e5763e 100644
--- a/sw/airborne/dpicco.h
+++ b/sw/airborne/modules/meteo/humid_dpicco.h
@@ -3,18 +3,6 @@
#include "std.h"
-#define DPICCO_NB_SENSOR 2
-
-extern uint16_t dpicco_val[DPICCO_NB_SENSOR];
-
-extern float dpicco_humid;
-extern float dpicco_temp;
-
-#define DPICCO_IDLE 0
-#define DPICCO_SETTINGS 1
-#define DPICCO_MEASURING_WR 2
-#define DPICCO_MEASURING_RD 3
-
#define DPICCO_HUMID_MAX 0x7FFF
#define DPICCO_HUMID_RANGE 100.0
@@ -22,11 +10,9 @@ extern float dpicco_temp;
#define DPICCO_TEMP_RANGE 165.0
#define DPICCO_TEMP_OFFS -40.0
-extern uint8_t dpicco_status;
-
extern void dpicco_init( void );
-
extern void dpicco_periodic( void );
+extern void dpicco_event( void );
#endif /* DPICCO_H */
diff --git a/sw/airborne/humid_sht.c b/sw/airborne/modules/meteo/humid_sht.c
similarity index 98%
rename from sw/airborne/humid_sht.c
rename to sw/airborne/modules/meteo/humid_sht.c
index 9a5ab9f99f..5ca724e690 100644
--- a/sw/airborne/humid_sht.c
+++ b/sw/airborne/modules/meteo/humid_sht.c
@@ -8,6 +8,9 @@
#include "std.h"
#include "LPC21xx.h"
+#include "uart.h"
+#include "messages.h"
+#include "downlink.h"
#include "humid_sht.h"
#include "led.h"
@@ -313,6 +316,8 @@ void humid_sht_periodic(void) {
s_connectionreset();
s_start_measure(HUMI);
humid_sht_status = SHT_MEASURING_HUMID;
+ DOWNLINK_SEND_SHT_STATUS(DefaultChannel, &humidsht, &tempsht, &fhumidsht, &ftempsht);
+ humid_sht_available = FALSE;
}
}
}
diff --git a/sw/airborne/humid_sht.h b/sw/airborne/modules/meteo/humid_sht.h
similarity index 94%
rename from sw/airborne/humid_sht.h
rename to sw/airborne/modules/meteo/humid_sht.h
index df81822fc2..4fddb7a803 100644
--- a/sw/airborne/humid_sht.h
+++ b/sw/airborne/modules/meteo/humid_sht.h
@@ -3,13 +3,17 @@
#include "std.h"
+#ifdef STM32
+#error LPC21_only
+#endif
+
/* GPIO P0.x defaults */
#ifndef DAT_PIN
-#define DAT_PIN 13
+#define DAT_PIN 30
#endif
#ifndef SCK_PIN
-#define SCK_PIN 15
+#define SCK_PIN 4
#endif
#define noACK 0