diff --git a/conf/modules/airspeed_amsys.xml b/conf/modules/airspeed_amsys.xml
index 000b2a424b..9e7c4b5cf1 100644
--- a/conf/modules/airspeed_amsys.xml
+++ b/conf/modules/airspeed_amsys.xml
@@ -34,7 +34,7 @@
-
+
diff --git a/conf/modules/airspeed_ets.xml b/conf/modules/airspeed_ets.xml
index 55ad1bf922..a32ec8534d 100644
--- a/conf/modules/airspeed_ets.xml
+++ b/conf/modules/airspeed_ets.xml
@@ -36,7 +36,7 @@
-
+
diff --git a/conf/modules/baro_amsys.xml b/conf/modules/baro_amsys.xml
index f4414a228f..e080cf9944 100644
--- a/conf/modules/baro_amsys.xml
+++ b/conf/modules/baro_amsys.xml
@@ -30,7 +30,7 @@
-
+
diff --git a/conf/modules/baro_bmp.xml b/conf/modules/baro_bmp.xml
index 457598c436..98f99149b0 100644
--- a/conf/modules/baro_bmp.xml
+++ b/conf/modules/baro_bmp.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/conf/modules/baro_ets.xml b/conf/modules/baro_ets.xml
index 1e155c60a0..27c2647525 100644
--- a/conf/modules/baro_ets.xml
+++ b/conf/modules/baro_ets.xml
@@ -34,7 +34,7 @@
-
+
diff --git a/conf/modules/baro_hca.xml b/conf/modules/baro_hca.xml
index a6fe0bbfa0..db27c37d59 100644
--- a/conf/modules/baro_hca.xml
+++ b/conf/modules/baro_hca.xml
@@ -14,7 +14,7 @@
-
+
diff --git a/conf/modules/baro_ms5611_i2c.xml b/conf/modules/baro_ms5611_i2c.xml
index 189eb8192d..45a01b83b3 100644
--- a/conf/modules/baro_ms5611_i2c.xml
+++ b/conf/modules/baro_ms5611_i2c.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/conf/modules/baro_ms5611_spi.xml b/conf/modules/baro_ms5611_spi.xml
index 2739d55496..f8df1fec16 100644
--- a/conf/modules/baro_ms5611_spi.xml
+++ b/conf/modules/baro_ms5611_spi.xml
@@ -18,8 +18,8 @@
-
-
+
+
include $(CFG_SHARED)/spi_master.makefile
diff --git a/conf/modules/baro_scp_i2c.xml b/conf/modules/baro_scp_i2c.xml
index 227d5a1066..4320efb88a 100644
--- a/conf/modules/baro_scp_i2c.xml
+++ b/conf/modules/baro_scp_i2c.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/conf/modules/digital_cam_i2c.xml b/conf/modules/digital_cam_i2c.xml
index 906e753b0f..f52b6ac0f6 100644
--- a/conf/modules/digital_cam_i2c.xml
+++ b/conf/modules/digital_cam_i2c.xml
@@ -27,7 +27,7 @@
-
+
diff --git a/conf/modules/direct_memory_logger.xml b/conf/modules/direct_memory_logger.xml
index f4c74b9022..e41bed3e65 100644
--- a/conf/modules/direct_memory_logger.xml
+++ b/conf/modules/direct_memory_logger.xml
@@ -27,9 +27,9 @@
-
-
-
+
+
+
include $(CFG_SHARED)/spi_master.makefile
diff --git a/conf/modules/ezcurrent.xml b/conf/modules/ezcurrent.xml
index 5780d49103..1246897cd7 100644
--- a/conf/modules/ezcurrent.xml
+++ b/conf/modules/ezcurrent.xml
@@ -14,7 +14,7 @@
-
+
diff --git a/conf/modules/generic_com.xml b/conf/modules/generic_com.xml
index 1eb9386a3f..ed27bd34e8 100644
--- a/conf/modules/generic_com.xml
+++ b/conf/modules/generic_com.xml
@@ -16,7 +16,7 @@
-
+
diff --git a/conf/modules/gps_ublox.xml b/conf/modules/gps_ublox.xml
index a082a92d26..0ab7093e28 100644
--- a/conf/modules/gps_ublox.xml
+++ b/conf/modules/gps_ublox.xml
@@ -25,7 +25,7 @@
-
+
ap.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_ubx.h\"
diff --git a/conf/modules/hott_telemetry.xml b/conf/modules/hott_telemetry.xml
index e5c3feef3a..dba6bb0752 100644
--- a/conf/modules/hott_telemetry.xml
+++ b/conf/modules/hott_telemetry.xml
@@ -25,11 +25,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/conf/modules/humid_htm_b71.xml b/conf/modules/humid_htm_b71.xml
index 7f90242ea2..d0b2b7b067 100644
--- a/conf/modules/humid_htm_b71.xml
+++ b/conf/modules/humid_htm_b71.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/conf/modules/imu_mpu9250.xml b/conf/modules/imu_mpu9250.xml
index 4b9579265b..e47113d529 100644
--- a/conf/modules/imu_mpu9250.xml
+++ b/conf/modules/imu_mpu9250.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/conf/modules/ins_vn100.xml b/conf/modules/ins_vn100.xml
index f2a77bcd1f..5e5959bcb0 100644
--- a/conf/modules/ins_vn100.xml
+++ b/conf/modules/ins_vn100.xml
@@ -15,8 +15,8 @@
-
-
+
+
include $(CFG_SHARED)/spi_master.makefile
diff --git a/conf/modules/logger_dataflash.xml b/conf/modules/logger_dataflash.xml
index fa1b606265..14f2ff7ee8 100644
--- a/conf/modules/logger_dataflash.xml
+++ b/conf/modules/logger_dataflash.xml
@@ -39,9 +39,9 @@ For more informations on how to use this module you can refer to the wiki : http
-
-
-
+
+
+
diff --git a/conf/modules/logger_sd_spi_direct.xml b/conf/modules/logger_sd_spi_direct.xml
index 1c35c84f49..44bf65c18b 100644
--- a/conf/modules/logger_sd_spi_direct.xml
+++ b/conf/modules/logger_sd_spi_direct.xml
@@ -38,10 +38,10 @@ Do not use start/stop functionality of the module, the module is not intended to
-
-
-
-
+
+
+
+
include $(CFG_SHARED)/sdlog.makefile
diff --git a/conf/modules/logger_spi_link.xml b/conf/modules/logger_spi_link.xml
index fea247d899..4138edb78b 100644
--- a/conf/modules/logger_spi_link.xml
+++ b/conf/modules/logger_spi_link.xml
@@ -12,8 +12,8 @@
-
-
+
+
include $(CFG_SHARED)/spi_master.makefile
diff --git a/conf/modules/mag_hmc5843.xml b/conf/modules/mag_hmc5843.xml
index c18fed99b5..0f61d02028 100644
--- a/conf/modules/mag_hmc5843.xml
+++ b/conf/modules/mag_hmc5843.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/conf/modules/mavlink.xml b/conf/modules/mavlink.xml
index 6cfb20d605..a78685bca9 100644
--- a/conf/modules/mavlink.xml
+++ b/conf/modules/mavlink.xml
@@ -20,7 +20,7 @@
-
+
ifneq (,$(findstring usb,$(MAVLINK_PORT_LOWER)))
ap.CFLAGS += -DUSE_USB_SERIAL
diff --git a/conf/modules/osd_max7456.xml b/conf/modules/osd_max7456.xml
index abdca90edf..ab69dcf63e 100644
--- a/conf/modules/osd_max7456.xml
+++ b/conf/modules/osd_max7456.xml
@@ -13,8 +13,8 @@
-
-
+
+
include $(CFG_SHARED)/spi_master.makefile
diff --git a/conf/modules/stereocam_droplet.xml b/conf/modules/stereocam_droplet.xml
index 7cea059ccf..356317d11f 100644
--- a/conf/modules/stereocam_droplet.xml
+++ b/conf/modules/stereocam_droplet.xml
@@ -11,9 +11,9 @@
-
-
-
+
+
+
diff --git a/conf/modules/stereocam_nav_line_avoid.xml b/conf/modules/stereocam_nav_line_avoid.xml
index 09b8790d9e..3bcb6ff318 100644
--- a/conf/modules/stereocam_nav_line_avoid.xml
+++ b/conf/modules/stereocam_nav_line_avoid.xml
@@ -14,9 +14,9 @@
-
-
-
+
+
+
diff --git a/conf/modules/temp_temod.xml b/conf/modules/temp_temod.xml
index d0f9fec30d..f6689d7477 100644
--- a/conf/modules/temp_temod.xml
+++ b/conf/modules/temp_temod.xml
@@ -14,7 +14,7 @@
-
+
diff --git a/conf/modules/uart_drop.xml b/conf/modules/uart_drop.xml
index 6443cd47d5..97ab897552 100644
--- a/conf/modules/uart_drop.xml
+++ b/conf/modules/uart_drop.xml
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/sw/tools/generators/gen_aircraft.ml b/sw/tools/generators/gen_aircraft.ml
index ee7db97a28..43af402bbb 100644
--- a/sw/tools/generators/gen_aircraft.ml
+++ b/sw/tools/generators/gen_aircraft.ml
@@ -59,11 +59,13 @@ let configure_xml2mk = fun f xml ->
(* all makefiles variables are forced to uppercase *)
let name = String.uppercase (ExtXml.attrib xml "name")
and value = ExtXml.attrib_or_default xml "value" ""
- and default = if String.lowercase (ExtXml.attrib_or_default xml "default" "") = "true" then "?" else ""
+ and default = ExtXml.attrib_or_default xml "default" ""
and case = ExtXml.attrib_or_default xml "case" "" in
(* Only print variable if value is not empty *)
if String.length value > 0 then
- fprintf f "%s %s= %s\n" name default value;
+ fprintf f "%s = %s\n" name value
+ else if String.length default > 0 then
+ fprintf f "%s ?= %s\n" name default;
(* also providing lower and upper case version on request *)
if Str.string_match (Str.regexp ".*lower.*") case 0 then
fprintf f "%s_LOWER = $(shell echo $(%s) | tr A-Z a-z)\n" name name;