mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 03:53:35 +08:00
Fix RPi2 build system
This commit is contained in:
committed by
Lorenz Meier
parent
02ba3317e9
commit
529460d573
@@ -36,6 +36,30 @@ if ("${BOARD}" STREQUAL "eagle" OR ("${BOARD}" STREQUAL "excelsior"))
|
||||
${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/mainapp.config
|
||||
DEPENDS mainapp
|
||||
DEST /home/linaro)
|
||||
|
||||
elseif ("${BOARD}" STREQUAL "rpi2")
|
||||
|
||||
add_executable(mainapp
|
||||
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
|
||||
apps.h
|
||||
)
|
||||
|
||||
target_link_libraries(mainapp
|
||||
-Wl,--start-group
|
||||
${module_libraries}
|
||||
df_driver_framework
|
||||
${df_driver_libs}
|
||||
pthread m rt
|
||||
-Wl,--end-group
|
||||
)
|
||||
|
||||
px4_add_scp_push(OUT upload
|
||||
OS ${OS}
|
||||
BOARD ${BOARD}
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/mainapp
|
||||
${CMAKE_SOURCE_DIR}/posix-configs/rpi2/mainapp.config
|
||||
DEPENDS mainapp
|
||||
DEST /home/pi)
|
||||
|
||||
else()
|
||||
add_executable(mainapp
|
||||
|
||||
@@ -178,10 +178,10 @@ int DfBmp280Wrapper::_publish(struct baro_sensor_data &data)
|
||||
const double R = 287.05; /* ideal gas constant in J/kg/K */
|
||||
|
||||
/* current pressure at MSL in kPa */
|
||||
double p1 = MSL_PRESSURE / 1000.0;
|
||||
double p1 = MSL_PRESSURE / 1000.0f;
|
||||
|
||||
/* measured pressure in kPa */
|
||||
double p = data.pressure_pa / 1000.0;
|
||||
double p = data.pressure_pa / 1000.0f;
|
||||
|
||||
/*
|
||||
* Solve:
|
||||
|
||||
Reference in New Issue
Block a user