mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
Added new config entry for DF driver entries
DF drivers can now be added in each config file by adding set(config_df_driver_list bmp280 ... ) Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
committed by
Julian Oes
parent
7ed6506406
commit
419f4c49ce
@@ -193,6 +193,11 @@ foreach(conf ${px4_required_config})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# List the DriverFramework drivers
|
||||
if(DEFINED config_df_driver_list)
|
||||
message("DF Drivers: ${config_df_driver_list}")
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# project definition
|
||||
#
|
||||
@@ -346,7 +351,7 @@ endforeach()
|
||||
add_subdirectory(src/firmware/${OS})
|
||||
|
||||
add_subdirectory(src/lib/DriverFramework/framework/src)
|
||||
add_subdirectory(src/lib/DriverFramework/drivers/)
|
||||
|
||||
#add_dependencies(df_driver_framework nuttx_export_${CONFIG}.stamp)
|
||||
if (NOT "${OS}" STREQUAL "nuttx")
|
||||
endif()
|
||||
@@ -355,6 +360,16 @@ if (config_io_board)
|
||||
add_subdirectory(src/modules/px4iofirmware)
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# DriverFramework Drivers
|
||||
#
|
||||
set(df_libraries)
|
||||
foreach(driver ${config_df_driver_list})
|
||||
add_subdirectory(src/lib/DriverFramework/drivers/${driver})
|
||||
list(APPEND df_libraries ${driver})
|
||||
#message(STATUS "adding driver: ${driver}")
|
||||
endforeach()
|
||||
|
||||
#=============================================================================
|
||||
# generate git version
|
||||
#
|
||||
|
||||
@@ -643,7 +643,6 @@ function(px4_add_common_flags)
|
||||
${CMAKE_BINARY_DIR}/src/modules
|
||||
${CMAKE_SOURCE_DIR}/mavlink/include/mavlink
|
||||
${CMAKE_SOURCE_DIR}/src/lib/DriverFramework/framework/include
|
||||
${CMAKE_SOURCE_DIR}/src/lib/DriverFramework/drivers/imu
|
||||
)
|
||||
|
||||
list(APPEND added_include_dirs
|
||||
|
||||
@@ -93,3 +93,8 @@ set(config_module_list
|
||||
#
|
||||
modules/muorb/adsp
|
||||
)
|
||||
|
||||
set(config_df_driver_list
|
||||
mpu9250
|
||||
bmp280
|
||||
)
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include_directories(../../../../lib/DriverFramework/drivers)
|
||||
|
||||
px4_add_module(
|
||||
MODULE platforms__posix__drivers__df_imu
|
||||
MAIN df_imu
|
||||
@@ -38,5 +41,6 @@ px4_add_module(
|
||||
DEPENDS
|
||||
platforms__common
|
||||
df_driver_framework
|
||||
df_mpu9250
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -60,8 +60,7 @@
|
||||
//#include <mathlib/math/filter/LowPassFilter2p.hpp>
|
||||
//#include <lib/conversion/rotation.h>
|
||||
//
|
||||
//#include "DriverFramework.hpp"
|
||||
#include "lib/DriverFramework/drivers/imu/mpu9250/MPU9250.hpp"
|
||||
#include "mpu9250/MPU9250.hpp"
|
||||
#include "DevMgr.hpp"
|
||||
|
||||
|
||||
|
||||
@@ -30,16 +30,15 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef QURT_LOG_H
|
||||
#define QURT_LOG_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
__BEGIN_DECLS
|
||||
|
||||
__EXPORT extern uint64_t hrt_absolute_time(void);
|
||||
|
||||
@@ -59,9 +58,4 @@ static __inline void qurt_log(int level, const char *file, int line,
|
||||
HAP_debug(buf, level, file, line);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // QURT_LOG_H
|
||||
|
||||
__END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user