Skip to content

Commit

Permalink
DriverFramework purge
Browse files Browse the repository at this point in the history
The bulk of this change was tightly coupled and needed to be deleted in one pass. Some of the smaller changes were things that broke as a result of the initial purge and subsequently fixed by further eradicating unnecessary platform differences. Finally, I deleted any dead code I came across in the related files I touched while going through everything.

 - DriverFramework (src/lib/DriverFramework submodule) completely removed
 - added dspal submodule in qurt platform (was brought in via DriverFramework)
 - all df wrapper drivers removed
 - all boards using df wrapper drivers updated to use in tree equivalents
 - unused empty arch/board.h on posix and qurt removed
 - unused IOCTLs removed (pub block, priv, etc)
 - Integrator delete methods only used from df wrapper drivers
 - commander: sensor calibration use "NuttX version" everywhere for now
 - sensors: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
 - battery_status: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
 - cdev cleanup conflicting typedefs and names with actual OS (pollevent_t, etc)
 - load_mon and top remove from linux boards (unused)
 - delete unused PX4_MAIN_FUNCTION
 - delete unused getreg32 macro
 - delete unused SIOCDEVPRIVATE define
 - named each platform tasks consistently
 - posix list_devices and list_topics removed (list_files now shows all virtual files)
  • Loading branch information
dagar committed Jan 13, 2020
1 parent 04ba05f commit de4f594
Show file tree
Hide file tree
Showing 165 changed files with 284 additions and 8,107 deletions.
7 changes: 3 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
path = src/lib/matrix
url = https://github.com/PX4/Matrix.git
branch = master
[submodule "src/lib/DriverFramework"]
path = src/lib/DriverFramework
url = https://github.com/PX4/DriverFramework.git
branch = master
[submodule "src/lib/ecl"]
path = src/lib/ecl
url = https://github.com/PX4/ecl.git
Expand Down Expand Up @@ -58,3 +54,6 @@
path = cmake/configs/uavcan_board_ident
url = https://github.com/PX4/uavcan_board_ident.git
branch = master
[submodule "platforms/qurt/dspal"]
path = platforms/qurt/dspal
url = https://github.com/ATLFlight/dspal.git
20 changes: 0 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ set(CONFIG "px4_sitl_default" CACHE STRING "desired configuration")

include(px4_add_module)
set(config_module_list)
set(config_df_driver_list)

include(px4_config)
include(px4_add_board)
Expand Down Expand Up @@ -311,25 +310,6 @@ add_subdirectory(msg EXCLUDE_FROM_ALL)

px4_generate_airframes_xml(BOARD ${PX4_BOARD})

#=============================================================================
# DriverFramework
#
px4_add_git_submodule(TARGET git_driverframework PATH "src/lib/DriverFramework")
set(OS ${PX4_PLATFORM})
add_subdirectory(src/lib/DriverFramework/framework)

# List the DriverFramework drivers
if (DEFINED config_df_driver_list)
message("DF Drivers: ${config_df_driver_list}")
endif()

set(df_driver_libs)
foreach(driver ${config_df_driver_list})
add_subdirectory(src/lib/DriverFramework/drivers/${driver})
list(APPEND df_driver_libs df_${driver})
message("Adding DF driver: ${driver}")
endforeach()

#=============================================================================
# external projects
#
Expand Down
3 changes: 1 addition & 2 deletions Documentation/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE = @CMAKE_SOURCE_DIR@/src/lib/DriverFramework \
@CMAKE_SOURCE_DIR@/src/modules/uavcan/libuavcan \
EXCLUDE = @CMAKE_SOURCE_DIR@/src/modules/uavcan/libuavcan \
@CMAKE_SOURCE_DIR@/src/modules/micrortps_bridge/micro-CDR \
@CMAKE_SOURCE_DIR@/src/examples \
@CMAKE_SOURCE_DIR@/src/templates
Expand Down
2 changes: 1 addition & 1 deletion Tools/astyle/files_to_check_code_style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ fi
exec find boards msg src platforms \
-path msg/templates/urtps -prune -o \
-path platforms/nuttx/NuttX -prune -o \
-path platforms/qurt/dspal -prune -o \
-path src/drivers/uavcan/libuavcan -prune -o \
-path src/drivers/uavcan/uavcan_drivers/kinetis/driver/include/uavcan_kinetis -prune -o \
-path src/lib/DriverFramework -prune -o \
-path src/lib/ecl -prune -o \
-path src/lib/matrix -prune -o \
-path src/lib/systemlib/uthash -prune -o \
Expand Down
6 changes: 2 additions & 4 deletions boards/aerotenna/ocpoc/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ px4_add_board(
pwm_out_sim
rc_input
#telemetry # all available telemetry drivers
DF_DRIVERS # NOTE: DriverFramework is migrating to intree PX4 drivers
mpu9250
MODULES
airspeed_selector
attitude_estimator_q
Expand All @@ -49,7 +47,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
Expand Down Expand Up @@ -77,7 +75,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
Expand Down
7 changes: 2 additions & 5 deletions boards/atlflight/eagle/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=gnu++11>)
add_definitions(
-D__PX4_POSIX_EAGLE
-D__PX4_LINUX

# For DriverFramework
-D__DF_LINUX
)

px4_add_board(
Expand Down Expand Up @@ -71,7 +68,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
Expand Down Expand Up @@ -108,7 +105,7 @@ px4_add_board(
sd_bench
shutdown
#tests # tests and test runner
top
#top
topic_listener
tune_control
ver
Expand Down
7 changes: 1 addition & 6 deletions boards/atlflight/eagle/qurt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,10 @@ px4_add_board(
barometer/bmp280
gps
imu/mpu9250
magnetometer/hmc5883
#magnetometer/hmc5883
qshell/qurt
snapdragon_pwm_out
spektrum_rc
DF_DRIVERS
isl29501
ltc2946
mpu9250
trone
MODULES
airspeed_selector
attitude_estimator_q
Expand Down
7 changes: 2 additions & 5 deletions boards/atlflight/excelsior/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=gnu++11>)
add_definitions(
-D__PX4_POSIX_EXCELSIOR
-D__PX4_LINUX

# For DriverFramework
-D__DF_LINUX
)

px4_add_board(
Expand Down Expand Up @@ -71,7 +68,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
Expand Down Expand Up @@ -108,7 +105,7 @@ px4_add_board(
sd_bench
shutdown
#tests # tests and test runner
top
#top
topic_listener
tune_control
ver
Expand Down
5 changes: 0 additions & 5 deletions boards/atlflight/excelsior/qurt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ px4_add_board(
qshell/qurt
snapdragon_pwm_out
spektrum_rc
DF_DRIVERS
isl29501
ltc2946
mpu9250
trone
MODULES
airspeed_selector
attitude_estimator_q
Expand Down
6 changes: 2 additions & 4 deletions boards/beaglebone/blue/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ px4_add_board(
pwm_out_sim
rc_input
#telemetry # all available telemetry drivers
DF_DRIVERS # NOTE: DriverFramework is migrating to intree PX4 drivers
mpu9250
MODULES
airspeed_selector
attitude_estimator_q
Expand All @@ -41,7 +39,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
Expand Down Expand Up @@ -70,7 +68,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
Expand Down
4 changes: 0 additions & 4 deletions boards/beaglebone/blue/src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ int rc_init(void)
#ifdef __RC_V0_3
return rc_initialize();
#else
#ifdef __DF_BBBLUE

if (rc_get_state() == RUNNING) { return 0; }

Expand Down Expand Up @@ -111,7 +110,6 @@ int rc_init(void)
//i2c, barometer and mpu will be initialized later

rc_set_state(RUNNING);
#endif

return 0;
#endif
Expand All @@ -123,7 +121,6 @@ void rc_cleaning(void)
#ifdef __RC_V0_3
rc_cleanup(); return ;
#else
#ifdef __DF_BBBLUE

if (rc_get_state() == EXITING) { return; }

Expand All @@ -136,5 +133,4 @@ void rc_cleaning(void)

rc_remove_pid_file();
#endif
#endif
}
2 changes: 1 addition & 1 deletion boards/emlid/navio2/cmake/upload.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#
############################################################################

if($ENV{AUTOPILOT_HOST})
if(DEFINED ENV{AUTOPILOT_HOST})
set(AUTOPILOT_HOST $ENV{AUTOPILOT_HOST})
else()
set(AUTOPILOT_HOST "navio")
Expand Down
9 changes: 2 additions & 7 deletions boards/emlid/navio2/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ px4_add_board(
pwm_out_sim
rc_input
#telemetry # all available telemetry drivers
DF_DRIVERS # NOTE: DriverFramework is migrating to intree PX4 drivers
isl29501
lsm9ds1
mpu9250
trone
MODULES
airspeed_selector
attitude_estimator_q
Expand All @@ -46,7 +41,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
Expand Down Expand Up @@ -75,7 +70,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
Expand Down
4 changes: 2 additions & 2 deletions boards/px4/raspberrypi/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
Expand Down Expand Up @@ -68,7 +68,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
Expand Down
4 changes: 2 additions & 2 deletions boards/px4/sitl/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
Expand Down Expand Up @@ -65,7 +65,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
Expand Down
4 changes: 2 additions & 2 deletions boards/px4/sitl/rtps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
Expand Down Expand Up @@ -67,7 +67,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
Expand Down
4 changes: 2 additions & 2 deletions boards/px4/sitl/test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
Expand Down Expand Up @@ -65,7 +65,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
Expand Down
16 changes: 0 additions & 16 deletions cmake/px4_add_board.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
# [ SYSTEMCMDS <list> ]
# [ EXAMPLES <list> ]
# [ SERIAL_PORTS <list> ]
# [ DF_DRIVERS <list> ]
# [ CONSTRAINED_FLASH ]
# [ TESTING ]
# )
Expand All @@ -77,7 +76,6 @@
# SYSTEMCMDS : list of system commands to build for this board (relative to src/systemcmds)
# EXAMPLES : list of example modules to build for this board (relative to src/examples)
# SERIAL_PORTS : mapping of user configurable serial ports and param facing name
# DF_DRIVERS : list of DriverFramework device drivers (includes DriverFramework driver and wrapper)
# CONSTRAINED_FLASH : flag to enable constrained flash options (eg limit init script status text)
# TESTING : flag to enable automatic inclusion of PX4 testing modules
#
Expand Down Expand Up @@ -148,7 +146,6 @@ function(px4_add_board)
SYSTEMCMDS
EXAMPLES
SERIAL_PORTS
DF_DRIVERS
OPTIONS
BUILD_BOOTLOADER
CONSTRAINED_FLASH
Expand Down Expand Up @@ -264,19 +261,6 @@ function(px4_add_board)
endforeach()
endif()

# DriverFramework drivers
if(DF_DRIVERS)
set(config_df_driver_list)
foreach(driver ${DF_DRIVERS})
list(APPEND config_df_driver_list ${driver})

if(EXISTS "${PX4_SOURCE_DIR}/src/drivers/driver_framework_wrapper/df_${driver}_wrapper")
list(APPEND config_module_list drivers/driver_framework_wrapper/df_${driver}_wrapper)
endif()
endforeach()
set(config_df_driver_list ${config_df_driver_list} PARENT_SCOPE)
endif()

# add board config directory src to build modules
file(RELATIVE_PATH board_support_src_rel ${PX4_SOURCE_DIR}/src ${PX4_BOARD_DIR})
list(APPEND config_module_list ${board_support_src_rel}/src)
Expand Down
Loading

0 comments on commit de4f594

Please sign in to comment.