mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-24 05:45:59 +08:00
autoload bebop sonar, thread only started if USE_SONAR defined, unifies functionality with ARDrone (#1920)
This commit is contained in:
committed by
Gautier Hattenberger
parent
e18b6bd0fb
commit
475ca416f7
@@ -10,7 +10,7 @@
|
||||
<module name="udp"/>
|
||||
</target>
|
||||
|
||||
<!--define name="USE_SONAR" value="TRUE"/-->
|
||||
<define name="USE_SONAR"/>
|
||||
|
||||
<!-- Subsystem section -->
|
||||
<module name="telemetry" type="transparent_udp"/>
|
||||
@@ -35,7 +35,6 @@
|
||||
<module name="video_thread">
|
||||
</module>
|
||||
|
||||
<module name="sonar_bebop"/>
|
||||
<module name="pose_history"/>
|
||||
|
||||
<module name="cv_detect_contour">
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
<module name="udp"/>
|
||||
</target>
|
||||
|
||||
<define name="USE_SONAR"/>
|
||||
|
||||
<!-- Subsystem section -->
|
||||
<module name="telemetry" type="transparent_udp"/>
|
||||
<module name="radio_control" type="datalink"/>
|
||||
@@ -29,7 +31,6 @@
|
||||
<module name="geo_mag"/>
|
||||
<module name="air_data"/>
|
||||
<module name="send_imu_mag_current"/>
|
||||
<module name="sonar_bebop"/> <!-- Needed for relative height est for velocity calc from opt flow-->
|
||||
<module name="pose_history"/>
|
||||
<module name="video_thread"/>
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
</doc>
|
||||
<autoload name="imu_common"/>
|
||||
<autoload name="imu_nps"/>
|
||||
<autoload name="sonar_bebop"/>
|
||||
<header>
|
||||
<file name="imu_bebop.h" dir="subsystems/imu"/>
|
||||
</header>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
<makefile target="ap">
|
||||
<define name="USE_SPI0" value="1"/>
|
||||
<define name="USE_ADC0" value="1"/>
|
||||
<define name="USE_SONAR" value="1"/>
|
||||
|
||||
<raw>
|
||||
include $(CFG_SHARED)/spi_master.makefile
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user