diff --git a/conf/airframes/TUDELFT/tudelft_bebop_autonomous_race.xml b/conf/airframes/TUDELFT/tudelft_bebop_autonomous_race.xml
index 7fb30c0f96..30e04b137f 100644
--- a/conf/airframes/TUDELFT/tudelft_bebop_autonomous_race.xml
+++ b/conf/airframes/TUDELFT/tudelft_bebop_autonomous_race.xml
@@ -10,7 +10,7 @@
-
+
@@ -35,7 +35,6 @@
-
diff --git a/conf/airframes/TUDELFT/tudelft_bebop_opticflow.xml b/conf/airframes/TUDELFT/tudelft_bebop_opticflow.xml
index 6d8f599797..06a16a78c3 100644
--- a/conf/airframes/TUDELFT/tudelft_bebop_opticflow.xml
+++ b/conf/airframes/TUDELFT/tudelft_bebop_opticflow.xml
@@ -10,6 +10,8 @@
+
+
@@ -29,7 +31,6 @@
-
diff --git a/conf/modules/imu_bebop.xml b/conf/modules/imu_bebop.xml
index 4f3c268a4f..4dcde257a4 100644
--- a/conf/modules/imu_bebop.xml
+++ b/conf/modules/imu_bebop.xml
@@ -19,6 +19,7 @@
+
diff --git a/conf/modules/sonar_bebop.xml b/conf/modules/sonar_bebop.xml
index 754f9d1bbe..a363397f0a 100644
--- a/conf/modules/sonar_bebop.xml
+++ b/conf/modules/sonar_bebop.xml
@@ -21,7 +21,6 @@
-
include $(CFG_SHARED)/spi_master.makefile
diff --git a/sw/airborne/modules/sonar/sonar_bebop.c b/sw/airborne/modules/sonar/sonar_bebop.c
index 3fb122498e..e72125018f 100644
--- a/sw/airborne/modules/sonar/sonar_bebop.c
+++ b/sw/airborne/modules/sonar/sonar_bebop.c
@@ -56,10 +56,9 @@ void sonar_bebop_init(void)
sonar_bebop_spi_t.input_buf = NULL;
sonar_bebop_spi_t.input_length = 0;
- int rc = pthread_create(&sonar_bebop_thread, NULL, sonar_bebop_read, NULL);
- if (rc < 0) {
- return;
- }
+#if USE_SONAR
+ pthread_create(&sonar_bebop_thread, NULL, sonar_bebop_read, NULL);
+#endif
}
/**