diff --git a/CMakeLists.txt b/CMakeLists.txt index 3891c085c2c..d0a54d987a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -406,7 +406,6 @@ add_subdirectory(src/lib EXCLUDE_FROM_ALL) add_subdirectory(platforms/${PX4_PLATFORM}/src/px4) add_subdirectory(platforms EXCLUDE_FROM_ALL) -add_subdirectory(src/modules/uORB EXCLUDE_FROM_ALL) # TODO: platform layer if(EXISTS "${PX4_BOARD_DIR}/CMakeLists.txt") add_subdirectory(${PX4_BOARD_DIR}) diff --git a/ROMFS/cannode/init.d/rcS b/ROMFS/cannode/init.d/rcS index deb4f11aa9b..f6c5a44d475 100644 --- a/ROMFS/cannode/init.d/rcS +++ b/ROMFS/cannode/init.d/rcS @@ -30,13 +30,6 @@ sercon # ver all -# -# Start the ORB (first app to start) -# tone_alarm and tune_control -# is dependent. -# -uorb start - # # Set the parameter file if mtd starts successfully. # diff --git a/ROMFS/px4fmu_common/init.d-posix/rc.replay b/ROMFS/px4fmu_common/init.d-posix/rc.replay index 25a96121975..89c999a38c7 100644 --- a/ROMFS/px4fmu_common/init.d-posix/rc.replay +++ b/ROMFS/px4fmu_common/init.d-posix/rc.replay @@ -20,7 +20,6 @@ module: replay ignore_others: false EOF -uorb start param set SDLOG_DIRS_MAX 7 # apply all params before ekf starts, as some params cannot be changed after startup diff --git a/ROMFS/px4fmu_common/init.d-posix/rcS b/ROMFS/px4fmu_common/init.d-posix/rcS index edf49e203a5..73b7c5c0ec1 100644 --- a/ROMFS/px4fmu_common/init.d-posix/rcS +++ b/ROMFS/px4fmu_common/init.d-posix/rcS @@ -53,8 +53,6 @@ else fi fi -uorb start - # Load parameters set PARAM_FILE eeprom/parameters_"$REQUESTED_AUTOSTART" param select $PARAM_FILE diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 6c2d616505c..583e1e038d2 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -73,13 +73,6 @@ sercon # ver all -# -# Start the ORB (first app to start) -# tone_alarm and tune_control -# is dependent. -# -uorb start - # # Try to mount the microSD card. # diff --git a/ROMFS/px4fmu_test/init.d/rc.standalone b/ROMFS/px4fmu_test/init.d/rc.standalone index 84f305e8812..a0072d5d1d8 100644 --- a/ROMFS/px4fmu_test/init.d/rc.standalone +++ b/ROMFS/px4fmu_test/init.d/rc.standalone @@ -5,9 +5,4 @@ echo "[i] doing standalone PX4FMU startup..." -# -# Start the ORB -# -uorb start - echo "[i] startup done" diff --git a/ROMFS/px4fmu_test/init.d/rcS b/ROMFS/px4fmu_test/init.d/rcS index 2097d6acc7e..4d8da071e4f 100644 --- a/ROMFS/px4fmu_test/init.d/rcS +++ b/ROMFS/px4fmu_test/init.d/rcS @@ -8,8 +8,6 @@ set unit_test_failure 0 set BOARD_RC ${R}etc/init.d/rc.board -uorb start - if rgbled start -X then led_control on -c blue @@ -41,11 +39,6 @@ fi # Start a minimal system # -# -# Start the ORB (first app to start) -# -uorb start - # # Load parameters # diff --git a/boards/aerotenna/ocpoc/default.cmake b/boards/aerotenna/ocpoc/default.cmake index 76c9993f09b..834c519475b 100644 --- a/boards/aerotenna/ocpoc/default.cmake +++ b/boards/aerotenna/ocpoc/default.cmake @@ -83,6 +83,7 @@ px4_add_board( #top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/airmind/mindpx-v2/default.cmake b/boards/airmind/mindpx-v2/default.cmake index 507f621ee83..77b8d1fd8f7 100644 --- a/boards/airmind/mindpx-v2/default.cmake +++ b/boards/airmind/mindpx-v2/default.cmake @@ -105,6 +105,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/atlflight/eagle/default.cmake b/boards/atlflight/eagle/default.cmake index 1a03e8b5369..95f3c84f1b2 100644 --- a/boards/atlflight/eagle/default.cmake +++ b/boards/atlflight/eagle/default.cmake @@ -110,6 +110,7 @@ px4_add_board( #top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/atlflight/excelsior/default.cmake b/boards/atlflight/excelsior/default.cmake index b67f9dbd34c..1a2bcf2a814 100644 --- a/boards/atlflight/excelsior/default.cmake +++ b/boards/atlflight/excelsior/default.cmake @@ -108,6 +108,7 @@ px4_add_board( #top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/av/x-v1/default.cmake b/boards/av/x-v1/default.cmake index 9d9e681e5d6..9ffe2680139 100644 --- a/boards/av/x-v1/default.cmake +++ b/boards/av/x-v1/default.cmake @@ -102,6 +102,7 @@ px4_add_board( top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/beaglebone/blue/default.cmake b/boards/beaglebone/blue/default.cmake index dcd771167d0..546fe5ca384 100644 --- a/boards/beaglebone/blue/default.cmake +++ b/boards/beaglebone/blue/default.cmake @@ -79,6 +79,7 @@ px4_add_board( #top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/bitcraze/crazyflie/default.cmake b/boards/bitcraze/crazyflie/default.cmake index 0cfe49246bc..23caa2cd310 100644 --- a/boards/bitcraze/crazyflie/default.cmake +++ b/boards/bitcraze/crazyflie/default.cmake @@ -64,6 +64,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/bitcraze/crazyflie21/default.cmake b/boards/bitcraze/crazyflie21/default.cmake index 7761ac72038..3ce93a5b89c 100644 --- a/boards/bitcraze/crazyflie21/default.cmake +++ b/boards/bitcraze/crazyflie21/default.cmake @@ -61,6 +61,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/cuav/can-gps-v1/default.cmake b/boards/cuav/can-gps-v1/default.cmake index 8a030499380..0515102c9af 100644 --- a/boards/cuav/can-gps-v1/default.cmake +++ b/boards/cuav/can-gps-v1/default.cmake @@ -49,6 +49,7 @@ px4_add_board( top topic_listener tune_control + uorb ver work_queue ) diff --git a/boards/cuav/nora/default.cmake b/boards/cuav/nora/default.cmake index c5688aeb9a8..e32f58844a4 100644 --- a/boards/cuav/nora/default.cmake +++ b/boards/cuav/nora/default.cmake @@ -109,6 +109,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/cuav/x7pro/default.cmake b/boards/cuav/x7pro/default.cmake index 1e011dcc1ec..82abc1c1cf1 100644 --- a/boards/cuav/x7pro/default.cmake +++ b/boards/cuav/x7pro/default.cmake @@ -112,6 +112,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/cubepilot/cubeorange/console.cmake b/boards/cubepilot/cubeorange/console.cmake index 043e4ce6cd3..fc66e0ec849 100644 --- a/boards/cubepilot/cubeorange/console.cmake +++ b/boards/cubepilot/cubeorange/console.cmake @@ -113,6 +113,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/cubepilot/cubeorange/default.cmake b/boards/cubepilot/cubeorange/default.cmake index 0ba9f310771..49c44379206 100644 --- a/boards/cubepilot/cubeorange/default.cmake +++ b/boards/cubepilot/cubeorange/default.cmake @@ -113,6 +113,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/cubepilot/cubeyellow/console.cmake b/boards/cubepilot/cubeyellow/console.cmake index 2f2201d4d33..d0c4c2595c8 100644 --- a/boards/cubepilot/cubeyellow/console.cmake +++ b/boards/cubepilot/cubeyellow/console.cmake @@ -112,6 +112,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/cubepilot/cubeyellow/default.cmake b/boards/cubepilot/cubeyellow/default.cmake index 4b3a5d67b38..04f688ce3c5 100644 --- a/boards/cubepilot/cubeyellow/default.cmake +++ b/boards/cubepilot/cubeyellow/default.cmake @@ -112,6 +112,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/emlid/navio2/default.cmake b/boards/emlid/navio2/default.cmake index fea84999924..0c826cd41fe 100644 --- a/boards/emlid/navio2/default.cmake +++ b/boards/emlid/navio2/default.cmake @@ -79,6 +79,7 @@ px4_add_board( #top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/holybro/durandal-v1/default.cmake b/boards/holybro/durandal-v1/default.cmake index 82c153a347e..561e262dc7f 100644 --- a/boards/holybro/durandal-v1/default.cmake +++ b/boards/holybro/durandal-v1/default.cmake @@ -110,6 +110,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/holybro/kakutef7/default.cmake b/boards/holybro/kakutef7/default.cmake index 6cb637baf00..0e76f42608a 100644 --- a/boards/holybro/kakutef7/default.cmake +++ b/boards/holybro/kakutef7/default.cmake @@ -72,6 +72,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/holybro/pix32v5/default.cmake b/boards/holybro/pix32v5/default.cmake index 20f81158173..a82a6236e40 100644 --- a/boards/holybro/pix32v5/default.cmake +++ b/boards/holybro/pix32v5/default.cmake @@ -117,6 +117,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/intel/aerofc-v1/default.cmake b/boards/intel/aerofc-v1/default.cmake index 77a8168204a..9d2b3061695 100644 --- a/boards/intel/aerofc-v1/default.cmake +++ b/boards/intel/aerofc-v1/default.cmake @@ -88,6 +88,7 @@ px4_add_board( top #topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/intel/aerofc-v1/rtps.cmake b/boards/intel/aerofc-v1/rtps.cmake index dd47790a000..c81745792a8 100644 --- a/boards/intel/aerofc-v1/rtps.cmake +++ b/boards/intel/aerofc-v1/rtps.cmake @@ -87,6 +87,7 @@ px4_add_board( top #topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/modalai/fc-v1/default.cmake b/boards/modalai/fc-v1/default.cmake index 54bfb8901fa..486fc14e5fe 100644 --- a/boards/modalai/fc-v1/default.cmake +++ b/boards/modalai/fc-v1/default.cmake @@ -104,6 +104,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/mro/ctrl-zero-f7-oem/default.cmake b/boards/mro/ctrl-zero-f7-oem/default.cmake index 887020703ca..d28c3aa004c 100644 --- a/boards/mro/ctrl-zero-f7-oem/default.cmake +++ b/boards/mro/ctrl-zero-f7-oem/default.cmake @@ -109,6 +109,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/mro/ctrl-zero-f7/default.cmake b/boards/mro/ctrl-zero-f7/default.cmake index 169d907c6a1..03111bcc84e 100644 --- a/boards/mro/ctrl-zero-f7/default.cmake +++ b/boards/mro/ctrl-zero-f7/default.cmake @@ -109,6 +109,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/mro/pixracerpro/default.cmake b/boards/mro/pixracerpro/default.cmake index 0bd854ff261..cf9322f170a 100644 --- a/boards/mro/pixracerpro/default.cmake +++ b/boards/mro/pixracerpro/default.cmake @@ -110,6 +110,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/mro/x21-777/default.cmake b/boards/mro/x21-777/default.cmake index 3f091aa63ee..92f0dea1b7c 100644 --- a/boards/mro/x21-777/default.cmake +++ b/boards/mro/x21-777/default.cmake @@ -111,6 +111,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/mro/x21/default.cmake b/boards/mro/x21/default.cmake index baf3ff0123e..f01a17d0fb0 100644 --- a/boards/mro/x21/default.cmake +++ b/boards/mro/x21/default.cmake @@ -107,6 +107,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/nxp/fmuk66-e/default.cmake b/boards/nxp/fmuk66-e/default.cmake index 51cbe7180ba..ba4d6ad325b 100644 --- a/boards/nxp/fmuk66-e/default.cmake +++ b/boards/nxp/fmuk66-e/default.cmake @@ -106,6 +106,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/nxp/fmuk66-e/socketcan.cmake b/boards/nxp/fmuk66-e/socketcan.cmake index db21a3a0b74..a982d2afcb4 100644 --- a/boards/nxp/fmuk66-e/socketcan.cmake +++ b/boards/nxp/fmuk66-e/socketcan.cmake @@ -105,6 +105,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/nxp/fmuk66-v3/default.cmake b/boards/nxp/fmuk66-v3/default.cmake index dccf51ad58e..f276f19de65 100644 --- a/boards/nxp/fmuk66-v3/default.cmake +++ b/boards/nxp/fmuk66-v3/default.cmake @@ -106,6 +106,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/nxp/fmuk66-v3/rtps.cmake b/boards/nxp/fmuk66-v3/rtps.cmake index ebf7f7beeb3..996298b5840 100644 --- a/boards/nxp/fmuk66-v3/rtps.cmake +++ b/boards/nxp/fmuk66-v3/rtps.cmake @@ -106,6 +106,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/nxp/fmuk66-v3/socketcan.cmake b/boards/nxp/fmuk66-v3/socketcan.cmake index 0aee173d690..502210b9ce4 100644 --- a/boards/nxp/fmuk66-v3/socketcan.cmake +++ b/boards/nxp/fmuk66-v3/socketcan.cmake @@ -105,6 +105,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/nxp/fmurt1062-v1/default.cmake b/boards/nxp/fmurt1062-v1/default.cmake index 23dc2d99892..6196bbe9690 100644 --- a/boards/nxp/fmurt1062-v1/default.cmake +++ b/boards/nxp/fmurt1062-v1/default.cmake @@ -98,6 +98,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/omnibus/f4sd/default.cmake b/boards/omnibus/f4sd/default.cmake index 676c7c6cf81..31ab03cc8cb 100644 --- a/boards/omnibus/f4sd/default.cmake +++ b/boards/omnibus/f4sd/default.cmake @@ -93,6 +93,7 @@ px4_add_board( top #topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v2/default.cmake b/boards/px4/fmu-v2/default.cmake index f65075961f0..6d07e60f911 100644 --- a/boards/px4/fmu-v2/default.cmake +++ b/boards/px4/fmu-v2/default.cmake @@ -123,6 +123,7 @@ px4_add_board( top #topic_listener tune_control + #uorb #usb_connected #ver #work_queue diff --git a/boards/px4/fmu-v2/fixedwing.cmake b/boards/px4/fmu-v2/fixedwing.cmake index 5222e88a1d3..d0656e3880f 100644 --- a/boards/px4/fmu-v2/fixedwing.cmake +++ b/boards/px4/fmu-v2/fixedwing.cmake @@ -82,6 +82,7 @@ px4_add_board( top #topic_listener tune_control + #uorb #usb_connected ver #work_queue diff --git a/boards/px4/fmu-v2/lpe.cmake b/boards/px4/fmu-v2/lpe.cmake index a21c45816d9..5bed6c1557c 100644 --- a/boards/px4/fmu-v2/lpe.cmake +++ b/boards/px4/fmu-v2/lpe.cmake @@ -108,6 +108,7 @@ px4_add_board( top #topic_listener tune_control + uorb ver work_queue diff --git a/boards/px4/fmu-v2/multicopter.cmake b/boards/px4/fmu-v2/multicopter.cmake index c3982cd2054..f6864321b4c 100644 --- a/boards/px4/fmu-v2/multicopter.cmake +++ b/boards/px4/fmu-v2/multicopter.cmake @@ -81,6 +81,7 @@ px4_add_board( top #topic_listener tune_control + #uorb #usb_connected ver #work_queue diff --git a/boards/px4/fmu-v2/rover.cmake b/boards/px4/fmu-v2/rover.cmake index 537db8dadc5..0f4c6318e5f 100644 --- a/boards/px4/fmu-v2/rover.cmake +++ b/boards/px4/fmu-v2/rover.cmake @@ -75,6 +75,7 @@ px4_add_board( top #topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v2/test.cmake b/boards/px4/fmu-v2/test.cmake index 732f116d416..5d24b4e6291 100644 --- a/boards/px4/fmu-v2/test.cmake +++ b/boards/px4/fmu-v2/test.cmake @@ -116,6 +116,7 @@ px4_add_board( top #topic_listener tune_control + #uorb #usb_connected ver #work_queue diff --git a/boards/px4/fmu-v3/ctrlalloc.cmake b/boards/px4/fmu-v3/ctrlalloc.cmake index 726900aaf65..7c28b349b64 100644 --- a/boards/px4/fmu-v3/ctrlalloc.cmake +++ b/boards/px4/fmu-v3/ctrlalloc.cmake @@ -122,6 +122,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v3/default.cmake b/boards/px4/fmu-v3/default.cmake index 6891046e530..68806200672 100644 --- a/boards/px4/fmu-v3/default.cmake +++ b/boards/px4/fmu-v3/default.cmake @@ -120,6 +120,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v3/rtps.cmake b/boards/px4/fmu-v3/rtps.cmake index cc2ad9ee8e9..be9068ff2fa 100644 --- a/boards/px4/fmu-v3/rtps.cmake +++ b/boards/px4/fmu-v3/rtps.cmake @@ -116,6 +116,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v3/stackcheck.cmake b/boards/px4/fmu-v3/stackcheck.cmake index cba93b5f94c..e9eaf3ab0e2 100644 --- a/boards/px4/fmu-v3/stackcheck.cmake +++ b/boards/px4/fmu-v3/stackcheck.cmake @@ -111,6 +111,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v4/ctrlalloc.cmake b/boards/px4/fmu-v4/ctrlalloc.cmake index d94052facfc..697956fbb87 100644 --- a/boards/px4/fmu-v4/ctrlalloc.cmake +++ b/boards/px4/fmu-v4/ctrlalloc.cmake @@ -119,6 +119,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v4/default.cmake b/boards/px4/fmu-v4/default.cmake index 6c88eb2c8e6..93e46a62ef8 100644 --- a/boards/px4/fmu-v4/default.cmake +++ b/boards/px4/fmu-v4/default.cmake @@ -118,6 +118,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v4/optimized.cmake b/boards/px4/fmu-v4/optimized.cmake index 05bb456997b..b65a252300b 100644 --- a/boards/px4/fmu-v4/optimized.cmake +++ b/boards/px4/fmu-v4/optimized.cmake @@ -112,6 +112,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v4/rtps.cmake b/boards/px4/fmu-v4/rtps.cmake index d87230acabc..6075ce88bd8 100644 --- a/boards/px4/fmu-v4/rtps.cmake +++ b/boards/px4/fmu-v4/rtps.cmake @@ -112,6 +112,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v4/stackcheck.cmake b/boards/px4/fmu-v4/stackcheck.cmake index 45e75772084..970e77528b1 100644 --- a/boards/px4/fmu-v4/stackcheck.cmake +++ b/boards/px4/fmu-v4/stackcheck.cmake @@ -111,6 +111,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v4/uavcanv1.cmake b/boards/px4/fmu-v4/uavcanv1.cmake index b4a9b292837..acb0d8bbf25 100644 --- a/boards/px4/fmu-v4/uavcanv1.cmake +++ b/boards/px4/fmu-v4/uavcanv1.cmake @@ -117,6 +117,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v4pro/default.cmake b/boards/px4/fmu-v4pro/default.cmake index 3592562acd1..4016bd56709 100644 --- a/boards/px4/fmu-v4pro/default.cmake +++ b/boards/px4/fmu-v4pro/default.cmake @@ -114,6 +114,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v4pro/rtps.cmake b/boards/px4/fmu-v4pro/rtps.cmake index 8167947868e..5539cd4546f 100644 --- a/boards/px4/fmu-v4pro/rtps.cmake +++ b/boards/px4/fmu-v4pro/rtps.cmake @@ -111,6 +111,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5/critmonitor.cmake b/boards/px4/fmu-v5/critmonitor.cmake index 48d0368bbde..7932969f70c 100644 --- a/boards/px4/fmu-v5/critmonitor.cmake +++ b/boards/px4/fmu-v5/critmonitor.cmake @@ -113,6 +113,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5/ctrlalloc.cmake b/boards/px4/fmu-v5/ctrlalloc.cmake index 0adf5cff0d2..c2dbb22f98d 100644 --- a/boards/px4/fmu-v5/ctrlalloc.cmake +++ b/boards/px4/fmu-v5/ctrlalloc.cmake @@ -122,6 +122,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5/debug.cmake b/boards/px4/fmu-v5/debug.cmake index e157e46b59d..0ad41402b09 100644 --- a/boards/px4/fmu-v5/debug.cmake +++ b/boards/px4/fmu-v5/debug.cmake @@ -118,6 +118,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5/default.cmake b/boards/px4/fmu-v5/default.cmake index 8eedc7b875c..8472ad76d4a 100644 --- a/boards/px4/fmu-v5/default.cmake +++ b/boards/px4/fmu-v5/default.cmake @@ -120,6 +120,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5/fixedwing.cmake b/boards/px4/fmu-v5/fixedwing.cmake index 9ff4e3286d2..8c333bcb4b2 100644 --- a/boards/px4/fmu-v5/fixedwing.cmake +++ b/boards/px4/fmu-v5/fixedwing.cmake @@ -87,6 +87,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5/irqmonitor.cmake b/boards/px4/fmu-v5/irqmonitor.cmake index 84f51e730a3..4749467037d 100644 --- a/boards/px4/fmu-v5/irqmonitor.cmake +++ b/boards/px4/fmu-v5/irqmonitor.cmake @@ -114,6 +114,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5/multicopter.cmake b/boards/px4/fmu-v5/multicopter.cmake index f966510aa26..ba85501855c 100644 --- a/boards/px4/fmu-v5/multicopter.cmake +++ b/boards/px4/fmu-v5/multicopter.cmake @@ -99,6 +99,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5/optimized.cmake b/boards/px4/fmu-v5/optimized.cmake index 46a2d2599c1..c63b47973cd 100644 --- a/boards/px4/fmu-v5/optimized.cmake +++ b/boards/px4/fmu-v5/optimized.cmake @@ -111,6 +111,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5/rover.cmake b/boards/px4/fmu-v5/rover.cmake index 94d03e80e9e..331e5fc07cd 100644 --- a/boards/px4/fmu-v5/rover.cmake +++ b/boards/px4/fmu-v5/rover.cmake @@ -86,6 +86,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5/rtps.cmake b/boards/px4/fmu-v5/rtps.cmake index 615857d1b22..0604383d73f 100644 --- a/boards/px4/fmu-v5/rtps.cmake +++ b/boards/px4/fmu-v5/rtps.cmake @@ -114,6 +114,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5/stackcheck.cmake b/boards/px4/fmu-v5/stackcheck.cmake index d497763de49..087dc8b588e 100644 --- a/boards/px4/fmu-v5/stackcheck.cmake +++ b/boards/px4/fmu-v5/stackcheck.cmake @@ -118,6 +118,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5/uavcanv1.cmake b/boards/px4/fmu-v5/uavcanv1.cmake index b75b5353ffa..e7612a0fd18 100644 --- a/boards/px4/fmu-v5/uavcanv1.cmake +++ b/boards/px4/fmu-v5/uavcanv1.cmake @@ -120,6 +120,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5x/base_phy_DP83848C.cmake b/boards/px4/fmu-v5x/base_phy_DP83848C.cmake index e9bdbce90ed..cedcdfd3ec5 100644 --- a/boards/px4/fmu-v5x/base_phy_DP83848C.cmake +++ b/boards/px4/fmu-v5x/base_phy_DP83848C.cmake @@ -113,6 +113,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v5x/default.cmake b/boards/px4/fmu-v5x/default.cmake index d760d664df9..b2544095dfb 100644 --- a/boards/px4/fmu-v5x/default.cmake +++ b/boards/px4/fmu-v5x/default.cmake @@ -117,6 +117,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v6u/default.cmake b/boards/px4/fmu-v6u/default.cmake index 4c839c807c6..000017b7cd1 100644 --- a/boards/px4/fmu-v6u/default.cmake +++ b/boards/px4/fmu-v6u/default.cmake @@ -116,6 +116,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v6u/stackcheck.cmake b/boards/px4/fmu-v6u/stackcheck.cmake index 4c839c807c6..000017b7cd1 100644 --- a/boards/px4/fmu-v6u/stackcheck.cmake +++ b/boards/px4/fmu-v6u/stackcheck.cmake @@ -116,6 +116,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v6x/default.cmake b/boards/px4/fmu-v6x/default.cmake index 0444cfb5d67..67d68acf7a4 100644 --- a/boards/px4/fmu-v6x/default.cmake +++ b/boards/px4/fmu-v6x/default.cmake @@ -114,6 +114,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/fmu-v6x/stackcheck.cmake b/boards/px4/fmu-v6x/stackcheck.cmake index 0444cfb5d67..67d68acf7a4 100644 --- a/boards/px4/fmu-v6x/stackcheck.cmake +++ b/boards/px4/fmu-v6x/stackcheck.cmake @@ -114,6 +114,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/px4/raspberrypi/default.cmake b/boards/px4/raspberrypi/default.cmake index 7e649273510..a728372bf5c 100644 --- a/boards/px4/raspberrypi/default.cmake +++ b/boards/px4/raspberrypi/default.cmake @@ -79,6 +79,7 @@ px4_add_board( #top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/px4/sitl/ctrlalloc.cmake b/boards/px4/sitl/ctrlalloc.cmake index 61c126f8fc0..267b18097a2 100644 --- a/boards/px4/sitl/ctrlalloc.cmake +++ b/boards/px4/sitl/ctrlalloc.cmake @@ -82,6 +82,7 @@ px4_add_board( #top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/px4/sitl/default.cmake b/boards/px4/sitl/default.cmake index cccb9d94096..4b38a847bc5 100644 --- a/boards/px4/sitl/default.cmake +++ b/boards/px4/sitl/default.cmake @@ -80,6 +80,7 @@ px4_add_board( #top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/px4/sitl/nolockstep.cmake b/boards/px4/sitl/nolockstep.cmake index f7973049511..0cf36842b1b 100644 --- a/boards/px4/sitl/nolockstep.cmake +++ b/boards/px4/sitl/nolockstep.cmake @@ -80,6 +80,7 @@ px4_add_board( #top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/px4/sitl/rtps.cmake b/boards/px4/sitl/rtps.cmake index cba4e8adfc2..9004c67dbeb 100644 --- a/boards/px4/sitl/rtps.cmake +++ b/boards/px4/sitl/rtps.cmake @@ -79,6 +79,7 @@ px4_add_board( #top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/px4/sitl/test.cmake b/boards/px4/sitl/test.cmake index 4c101974a40..861b5af0d2a 100644 --- a/boards/px4/sitl/test.cmake +++ b/boards/px4/sitl/test.cmake @@ -78,6 +78,7 @@ px4_add_board( #top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/scumaker/pilotpi/arm64.cmake b/boards/scumaker/pilotpi/arm64.cmake index 9674354dd01..f02d39b0872 100644 --- a/boards/scumaker/pilotpi/arm64.cmake +++ b/boards/scumaker/pilotpi/arm64.cmake @@ -79,6 +79,7 @@ px4_add_board( #top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/scumaker/pilotpi/default.cmake b/boards/scumaker/pilotpi/default.cmake index 853dbbf0417..c5fed5e4417 100644 --- a/boards/scumaker/pilotpi/default.cmake +++ b/boards/scumaker/pilotpi/default.cmake @@ -79,6 +79,7 @@ px4_add_board( #top topic_listener tune_control + uorb ver work_queue EXAMPLES diff --git a/boards/spracing/h7extreme/default.cmake b/boards/spracing/h7extreme/default.cmake index 9c7f0ada3af..e82de24a40a 100644 --- a/boards/spracing/h7extreme/default.cmake +++ b/boards/spracing/h7extreme/default.cmake @@ -107,6 +107,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/boards/uvify/core/default.cmake b/boards/uvify/core/default.cmake index 4c7663d9b19..12d8879e1d5 100644 --- a/boards/uvify/core/default.cmake +++ b/boards/uvify/core/default.cmake @@ -88,6 +88,7 @@ px4_add_board( top topic_listener tune_control + uorb usb_connected ver work_queue diff --git a/cmake/gtest/px4_add_gtest.cmake b/cmake/gtest/px4_add_gtest.cmake index 77b2b5c24fa..5560fca0621 100644 --- a/cmake/gtest/px4_add_gtest.cmake +++ b/cmake/gtest/px4_add_gtest.cmake @@ -92,7 +92,7 @@ function(px4_add_functional_gtest) target_link_libraries(${TESTNAME} ${LINKLIBS} gtest_functional_main px4_layer px4_platform - modules__uORB + uORB systemlib cdev px4_work_queue diff --git a/cmake/px4_add_common_flags.cmake b/cmake/px4_add_common_flags.cmake index 699d9766412..546cbfce30e 100644 --- a/cmake/px4_add_common_flags.cmake +++ b/cmake/px4_add_common_flags.cmake @@ -180,7 +180,9 @@ function(px4_add_common_flags) ${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/src/px4/${PX4_CHIP_MANUFACTURER}/${PX4_CHIP}/include ${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/src/px4/common/include + ${PX4_SOURCE_DIR}/platforms/common ${PX4_SOURCE_DIR}/platforms/common/include + ${PX4_SOURCE_DIR}/src ${PX4_SOURCE_DIR}/src/include ${PX4_SOURCE_DIR}/src/lib diff --git a/platforms/common/CMakeLists.txt b/platforms/common/CMakeLists.txt index be145bdbae9..2e5dc931a6b 100644 --- a/platforms/common/CMakeLists.txt +++ b/platforms/common/CMakeLists.txt @@ -36,7 +36,7 @@ set(SRCS) if (NOT "${PX4_PLATFORM}" MATCHES "qurt" AND NOT "${PX4_BOARD}" MATCHES "io-v2" AND NOT "${PX4_BOARD_LABEL}" MATCHES "bootloader") list(APPEND SRCS px4_log.cpp - ) + ) endif() add_library(px4_platform @@ -50,11 +50,12 @@ add_library(px4_platform shutdown.cpp spi.cpp ${SRCS} - ) +) add_dependencies(px4_platform prebuild_targets) -if (NOT "${PX4_PLATFORM}" MATCHES "qurt" AND NOT "${PX4_BOARD}" MATCHES "io-v2") - target_link_libraries(px4_platform PRIVATE modules__uORB) # px4_log awkward dependency with uORB, TODO: orb should part of the platform layer +if (NOT "${PX4_BOARD}" MATCHES "io-v2") + add_subdirectory(uORB) + target_link_libraries(px4_platform PRIVATE uORB) endif() add_subdirectory(px4_work_queue) diff --git a/src/modules/uORB/CMakeLists.txt b/platforms/common/uORB/CMakeLists.txt similarity index 67% rename from src/modules/uORB/CMakeLists.txt rename to platforms/common/uORB/CMakeLists.txt index 8c97b527ba6..5838d8c40ef 100644 --- a/src/modules/uORB/CMakeLists.txt +++ b/platforms/common/uORB/CMakeLists.txt @@ -31,44 +31,35 @@ # ############################################################################ -if(NOT PX4_BOARD MATCHES "px4_io") # TODO: fix this hack (move uORB to platform layer) +# this includes the generated topics directory +include_directories(${CMAKE_CURRENT_BINARY_DIR}) - # this includes the generated topics directory - include_directories(${CMAKE_CURRENT_BINARY_DIR}) +px4_add_library(uORB + ORBSet.hpp + Publication.hpp + PublicationMulti.hpp + Subscription.cpp + Subscription.hpp + SubscriptionCallback.hpp + SubscriptionInterval.hpp + SubscriptionMultiArray.hpp + uORB.cpp + uORB.h + uORBCommon.hpp + uORBCommunicator.hpp + uORBDeviceMaster.cpp + uORBDeviceMaster.hpp + uORBDeviceNode.cpp + uORBDeviceNode.hpp + uORBManager.cpp + uORBManager.hpp + uORBUtils.cpp + uORBUtils.hpp +) - px4_add_module( - MODULE modules__uORB - MAIN uorb - COMPILE_FLAGS - ${MAX_CUSTOM_OPT_LEVEL} - SRCS - ORBSet.hpp - Publication.hpp - PublicationMulti.hpp - Subscription.cpp - Subscription.hpp - SubscriptionCallback.hpp - SubscriptionInterval.hpp - SubscriptionMultiArray.hpp - uORB.cpp - uORB.h - uORBCommon.hpp - uORBCommunicator.hpp - uORBDeviceMaster.cpp - uORBDeviceMaster.hpp - uORBDeviceNode.cpp - uORBDeviceNode.hpp - uORBMain.cpp - uORBManager.cpp - uORBManager.hpp - uORBUtils.cpp - uORBUtils.hpp - DEPENDS - cdev - uorb_msgs - ) +target_compile_options(uORB PRIVATE ${MAX_CUSTOM_OPT_LEVEL}) +target_link_libraries(uORB PRIVATE cdev uorb_msgs) - if(PX4_TESTING) - add_subdirectory(uORB_tests) - endif() +if(PX4_TESTING) + add_subdirectory(uORB_tests) endif() diff --git a/src/modules/uORB/ORBSet.hpp b/platforms/common/uORB/ORBSet.hpp similarity index 99% rename from src/modules/uORB/ORBSet.hpp rename to platforms/common/uORB/ORBSet.hpp index 94ba85138eb..aed38dbc8f6 100644 --- a/src/modules/uORB/ORBSet.hpp +++ b/platforms/common/uORB/ORBSet.hpp @@ -143,4 +143,3 @@ private: Node *_top; Node *_end; }; - diff --git a/src/modules/uORB/Publication.hpp b/platforms/common/uORB/Publication.hpp similarity index 100% rename from src/modules/uORB/Publication.hpp rename to platforms/common/uORB/Publication.hpp diff --git a/src/modules/uORB/PublicationMulti.hpp b/platforms/common/uORB/PublicationMulti.hpp similarity index 100% rename from src/modules/uORB/PublicationMulti.hpp rename to platforms/common/uORB/PublicationMulti.hpp diff --git a/src/modules/uORB/Subscription.cpp b/platforms/common/uORB/Subscription.cpp similarity index 100% rename from src/modules/uORB/Subscription.cpp rename to platforms/common/uORB/Subscription.cpp diff --git a/src/modules/uORB/Subscription.hpp b/platforms/common/uORB/Subscription.hpp similarity index 100% rename from src/modules/uORB/Subscription.hpp rename to platforms/common/uORB/Subscription.hpp diff --git a/src/modules/uORB/SubscriptionBlocking.hpp b/platforms/common/uORB/SubscriptionBlocking.hpp similarity index 100% rename from src/modules/uORB/SubscriptionBlocking.hpp rename to platforms/common/uORB/SubscriptionBlocking.hpp diff --git a/src/modules/uORB/SubscriptionCallback.hpp b/platforms/common/uORB/SubscriptionCallback.hpp similarity index 100% rename from src/modules/uORB/SubscriptionCallback.hpp rename to platforms/common/uORB/SubscriptionCallback.hpp diff --git a/src/modules/uORB/SubscriptionInterval.hpp b/platforms/common/uORB/SubscriptionInterval.hpp similarity index 100% rename from src/modules/uORB/SubscriptionInterval.hpp rename to platforms/common/uORB/SubscriptionInterval.hpp diff --git a/src/modules/uORB/SubscriptionMultiArray.hpp b/platforms/common/uORB/SubscriptionMultiArray.hpp similarity index 100% rename from src/modules/uORB/SubscriptionMultiArray.hpp rename to platforms/common/uORB/SubscriptionMultiArray.hpp diff --git a/src/modules/uORB/uORB.cpp b/platforms/common/uORB/uORB.cpp similarity index 84% rename from src/modules/uORB/uORB.cpp rename to platforms/common/uORB/uORB.cpp index 23830d4638c..7e3b96904d4 100644 --- a/src/modules/uORB/uORB.cpp +++ b/platforms/common/uORB/uORB.cpp @@ -37,9 +37,60 @@ */ #include "uORB.h" + #include "uORBManager.hpp" #include "uORBCommon.hpp" +static uORB::DeviceMaster *g_dev = nullptr; + +int uorb_start(void) +{ + if (g_dev != nullptr) { + PX4_WARN("already loaded"); + /* user wanted to start uorb, its already running, no error */ + return 0; + } + + if (!uORB::Manager::initialize()) { + PX4_ERR("uorb manager alloc failed"); + return -ENOMEM; + } + + /* create the driver */ + g_dev = uORB::Manager::get_instance()->get_device_master(); + + if (g_dev == nullptr) { + return -errno; + } + + return OK; +} + +int uorb_status(void) +{ + if (g_dev != nullptr) { + g_dev->printStatistics(); + + } else { + PX4_INFO("uorb is not running"); + } + + return OK; +} + +int uorb_top(char **topic_filter, int num_filters) +{ + if (g_dev != nullptr) { + g_dev->showTop(topic_filter, num_filters); + + } else { + PX4_INFO("uorb is not running"); + } + + return OK; +} + + orb_advert_t orb_advertise(const struct orb_metadata *meta, const void *data) { return uORB::Manager::get_instance()->orb_advertise(meta, data); diff --git a/src/modules/uORB/uORB.h b/platforms/common/uORB/uORB.h similarity index 98% rename from src/modules/uORB/uORB.h rename to platforms/common/uORB/uORB.h index b9d0f2705f5..95061c37f44 100644 --- a/src/modules/uORB/uORB.h +++ b/platforms/common/uORB/uORB.h @@ -114,6 +114,10 @@ typedef const struct orb_metadata *orb_id_t; __BEGIN_DECLS +int uorb_start(void); +int uorb_status(void); +int uorb_top(char **topic_filter, int num_filters); + /** * ORB topic advertiser handle. * diff --git a/src/modules/uORB/uORBCommon.hpp b/platforms/common/uORB/uORBCommon.hpp similarity index 100% rename from src/modules/uORB/uORBCommon.hpp rename to platforms/common/uORB/uORBCommon.hpp diff --git a/src/modules/uORB/uORBCommunicator.hpp b/platforms/common/uORB/uORBCommunicator.hpp similarity index 100% rename from src/modules/uORB/uORBCommunicator.hpp rename to platforms/common/uORB/uORBCommunicator.hpp diff --git a/src/modules/uORB/uORBDeviceMaster.cpp b/platforms/common/uORB/uORBDeviceMaster.cpp similarity index 100% rename from src/modules/uORB/uORBDeviceMaster.cpp rename to platforms/common/uORB/uORBDeviceMaster.cpp diff --git a/src/modules/uORB/uORBDeviceMaster.hpp b/platforms/common/uORB/uORBDeviceMaster.hpp similarity index 100% rename from src/modules/uORB/uORBDeviceMaster.hpp rename to platforms/common/uORB/uORBDeviceMaster.hpp diff --git a/src/modules/uORB/uORBDeviceNode.cpp b/platforms/common/uORB/uORBDeviceNode.cpp similarity index 100% rename from src/modules/uORB/uORBDeviceNode.cpp rename to platforms/common/uORB/uORBDeviceNode.cpp diff --git a/src/modules/uORB/uORBDeviceNode.hpp b/platforms/common/uORB/uORBDeviceNode.hpp similarity index 100% rename from src/modules/uORB/uORBDeviceNode.hpp rename to platforms/common/uORB/uORBDeviceNode.hpp diff --git a/src/modules/uORB/uORBManager.cpp b/platforms/common/uORB/uORBManager.cpp similarity index 100% rename from src/modules/uORB/uORBManager.cpp rename to platforms/common/uORB/uORBManager.cpp diff --git a/src/modules/uORB/uORBManager.hpp b/platforms/common/uORB/uORBManager.hpp similarity index 100% rename from src/modules/uORB/uORBManager.hpp rename to platforms/common/uORB/uORBManager.hpp diff --git a/src/modules/uORB/uORBTopics.h b/platforms/common/uORB/uORBTopics.h similarity index 100% rename from src/modules/uORB/uORBTopics.h rename to platforms/common/uORB/uORBTopics.h diff --git a/src/modules/uORB/uORBUtils.cpp b/platforms/common/uORB/uORBUtils.cpp similarity index 100% rename from src/modules/uORB/uORBUtils.cpp rename to platforms/common/uORB/uORBUtils.cpp diff --git a/src/modules/uORB/uORBUtils.hpp b/platforms/common/uORB/uORBUtils.hpp similarity index 100% rename from src/modules/uORB/uORBUtils.hpp rename to platforms/common/uORB/uORBUtils.hpp diff --git a/src/modules/uORB/uORB_tests/CMakeLists.txt b/platforms/common/uORB/uORB_tests/CMakeLists.txt similarity index 100% rename from src/modules/uORB/uORB_tests/CMakeLists.txt rename to platforms/common/uORB/uORB_tests/CMakeLists.txt diff --git a/src/modules/uORB/uORB_tests/uORBTest_UnitTest.cpp b/platforms/common/uORB/uORB_tests/uORBTest_UnitTest.cpp similarity index 100% rename from src/modules/uORB/uORB_tests/uORBTest_UnitTest.cpp rename to platforms/common/uORB/uORB_tests/uORBTest_UnitTest.cpp diff --git a/src/modules/uORB/uORB_tests/uORBTest_UnitTest.hpp b/platforms/common/uORB/uORB_tests/uORBTest_UnitTest.hpp similarity index 100% rename from src/modules/uORB/uORB_tests/uORBTest_UnitTest.hpp rename to platforms/common/uORB/uORB_tests/uORBTest_UnitTest.hpp diff --git a/src/modules/uORB/uORB_tests/uORB_tests_main.cpp b/platforms/common/uORB/uORB_tests/uORB_tests_main.cpp similarity index 100% rename from src/modules/uORB/uORB_tests/uORB_tests_main.cpp rename to platforms/common/uORB/uORB_tests/uORB_tests_main.cpp diff --git a/platforms/nuttx/CMakeLists.txt b/platforms/nuttx/CMakeLists.txt index 0c78f21541e..93c34ffc808 100644 --- a/platforms/nuttx/CMakeLists.txt +++ b/platforms/nuttx/CMakeLists.txt @@ -93,7 +93,7 @@ list(APPEND nuttx_libs nuttx_fs nuttx_mm nuttx_sched - ) +) if (CONFIG_NET) list(APPEND nuttx_libs nuttx_net) @@ -163,7 +163,7 @@ endif() add_custom_command(OUTPUT ${PX4_BINARY_OUTPUT} COMMAND ${CMAKE_OBJCOPY} -O binary ${PX4_BINARY_DIR_REL}/${FW_NAME} ${PX4_BINARY_OUTPUT} DEPENDS px4 - ) +) # create .px4 with parameter and airframe metadata if (TARGET parameters_xml AND TARGET airframes_xml) @@ -203,7 +203,7 @@ add_custom_target(weak_symbols DEPENDS px4 VERBATIM USES_TERMINAL - ) +) # debugger helpers @@ -292,7 +292,7 @@ add_custom_target(debug DEPENDS px4 ${PX4_BINARY_DIR}/.gdbinit WORKING_DIRECTORY ${PX4_BINARY_DIR} USES_TERMINAL - ) +) include(blackmagic) include(jlink) diff --git a/platforms/nuttx/src/px4/common/CMakeLists.txt b/platforms/nuttx/src/px4/common/CMakeLists.txt index 5bb17b5877e..6a87f19a10d 100644 --- a/platforms/nuttx/src/px4/common/CMakeLists.txt +++ b/platforms/nuttx/src/px4/common/CMakeLists.txt @@ -32,7 +32,7 @@ ############################################################################ # skip for px4_layer support on an IO board -if(NOT PX4_BOARD MATCHES "px4_io") +if(NOT PX4_BOARD MATCHES "io-v2") add_library(px4_layer board_crashdump.c @@ -57,6 +57,7 @@ if(NOT PX4_BOARD MATCHES "px4_io") nuttx_apps nuttx_sched px4_work_queue + uORB ) else() add_library(px4_layer ${PX4_SOURCE_DIR}/platforms/common/empty.c) diff --git a/platforms/nuttx/src/px4/common/px4_init.cpp b/platforms/nuttx/src/px4/common/px4_init.cpp index c731ad16b6f..563974a171c 100644 --- a/platforms/nuttx/src/px4/common/px4_init.cpp +++ b/platforms/nuttx/src/px4/common/px4_init.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include @@ -118,6 +119,10 @@ int px4_platform_init(void) px4::WorkQueueManagerStart(); + uorb_start(); + + px4_log_initialize(); + return PX4_OK; } diff --git a/platforms/posix/CMakeLists.txt b/platforms/posix/CMakeLists.txt index 03eb02daa1e..927c3e35b2a 100644 --- a/platforms/posix/CMakeLists.txt +++ b/platforms/posix/CMakeLists.txt @@ -70,7 +70,7 @@ else() target_link_libraries(px4 PRIVATE rt) endif() - target_link_libraries(px4 PRIVATE modules__uORB) + target_link_libraries(px4 PRIVATE uORB) #============================================================================= # install diff --git a/platforms/posix/src/px4/common/px4_init.cpp b/platforms/posix/src/px4/common/px4_init.cpp index a28e01c0149..b93a53ba5fd 100644 --- a/platforms/posix/src/px4/common/px4_init.cpp +++ b/platforms/posix/src/px4/common/px4_init.cpp @@ -37,6 +37,7 @@ #include #include #include +#include int px4_platform_init(void) { @@ -46,5 +47,9 @@ int px4_platform_init(void) px4::WorkQueueManagerStart(); + uorb_start(); + + px4_log_initialize(); + return PX4_OK; } diff --git a/platforms/qurt/src/px4/common/commands_hil.c b/platforms/qurt/src/px4/common/commands_hil.c index 8baaa324166..6519fcce328 100644 --- a/platforms/qurt/src/px4/common/commands_hil.c +++ b/platforms/qurt/src/px4/common/commands_hil.c @@ -42,7 +42,6 @@ const char *get_commands() { static const char *commands = - "uorb start\n" "param set CAL_GYRO0_ID 2293760\n" "param set CAL_ACC0_ID 1310720\n" "param set CAL_ACC1_ID 1376256\n" diff --git a/platforms/qurt/src/px4/common/main.cpp b/platforms/qurt/src/px4/common/main.cpp index 5d69ae94918..a238dc33f51 100644 --- a/platforms/qurt/src/px4/common/main.cpp +++ b/platforms/qurt/src/px4/common/main.cpp @@ -184,7 +184,7 @@ const char *get_commands() // All that needs to be started automatically on the DSP side // are uorb and qshell. After that, everything else can get // started from the main startup script on the Linux side. - static const char *commands = "uorb start\nqshell start\n"; + static const char *commands = "qshell start\n"; return commands; } diff --git a/platforms/qurt/src/px4/common/px4_init.cpp b/platforms/qurt/src/px4/common/px4_init.cpp index 1921d88fe3b..73bada3ae17 100644 --- a/platforms/qurt/src/px4/common/px4_init.cpp +++ b/platforms/qurt/src/px4/common/px4_init.cpp @@ -46,5 +46,9 @@ int px4_platform_init() px4::WorkQueueManagerStart(); + uorb_start(); + + //px4_log_initialize(); + return PX4_OK; } diff --git a/posix-configs/SITL/init/test/cmd_template.in b/posix-configs/SITL/init/test/cmd_template.in index 78a3c7726d3..c758f6a8ec4 100644 --- a/posix-configs/SITL/init/test/cmd_template.in +++ b/posix-configs/SITL/init/test/cmd_template.in @@ -3,8 +3,6 @@ # (px4-alias.sh is expected to be in the PATH) . px4-alias.sh -uorb start - param load param set CBRK_SUPPLY_CHK 894281 param set SYS_RESTART_TYPE 0 diff --git a/posix-configs/SITL/init/test/test_mavlink b/posix-configs/SITL/init/test/test_mavlink index 540eb030960..e5db40970f0 100644 --- a/posix-configs/SITL/init/test/test_mavlink +++ b/posix-configs/SITL/init/test/test_mavlink @@ -3,8 +3,6 @@ # (px4-alias.sh is expected to be in the PATH) . px4-alias.sh -uorb start - param load param set CBRK_SUPPLY_CHK 894281 param set SYS_RESTART_TYPE 0 diff --git a/posix-configs/SITL/init/test/test_shutdown b/posix-configs/SITL/init/test/test_shutdown index 8fe5fe1f7dc..6f5649f9f25 100644 --- a/posix-configs/SITL/init/test/test_shutdown +++ b/posix-configs/SITL/init/test/test_shutdown @@ -3,8 +3,6 @@ # (px4-alias.sh is expected to be in the PATH) . px4-alias.sh -uorb start - param load param set BAT_N_CELLS 3 diff --git a/posix-configs/SITL/init/test/test_template.in b/posix-configs/SITL/init/test/test_template.in index c55a98ece20..d495bde084a 100644 --- a/posix-configs/SITL/init/test/test_template.in +++ b/posix-configs/SITL/init/test/test_template.in @@ -3,8 +3,6 @@ # (px4-alias.sh is expected to be in the PATH) . px4-alias.sh -uorb start - param load param set CBRK_SUPPLY_CHK 894281 param set SYS_RESTART_TYPE 0 diff --git a/posix-configs/SITL/init/test/tests_all b/posix-configs/SITL/init/test/tests_all index 252cc343a17..063dee50dab 100644 --- a/posix-configs/SITL/init/test/tests_all +++ b/posix-configs/SITL/init/test/tests_all @@ -3,8 +3,6 @@ # (px4-alias.sh is expected to be in the PATH) . px4-alias.sh -uorb start - param load param set CBRK_SUPPLY_CHK 894281 param set SYS_RESTART_TYPE 0 diff --git a/posix-configs/bbblue/px4.config b/posix-configs/bbblue/px4.config index ed127ef660c..25517b324d5 100644 --- a/posix-configs/bbblue/px4.config +++ b/posix-configs/bbblue/px4.config @@ -6,7 +6,6 @@ # config for a quad # modified from ../rpi/px4.config -uorb start param load param set CBRK_SUPPLY_CHK 894281 diff --git a/posix-configs/bbblue/px4_fw.config b/posix-configs/bbblue/px4_fw.config index 11ec56d5542..8ed0816836c 100644 --- a/posix-configs/bbblue/px4_fw.config +++ b/posix-configs/bbblue/px4_fw.config @@ -6,7 +6,6 @@ # config for fixed wing (FW) # modified from ./px4.config, switch att/pos_control & mixer -uorb start param load param set CBRK_SUPPLY_CHK 894281 diff --git a/posix-configs/eagle/200qx/mainapp.config b/posix-configs/eagle/200qx/mainapp.config index fedc520c273..43495fd6796 100644 --- a/posix-configs/eagle/200qx/mainapp.config +++ b/posix-configs/eagle/200qx/mainapp.config @@ -4,7 +4,6 @@ # (px4-alias.sh is expected to be in the PATH) . px4-alias.sh -uorb start muorb start logger start -t -b 200 # Wait 1s before setting parameters for muorb to initialize diff --git a/posix-configs/eagle/200qx/px4.config b/posix-configs/eagle/200qx/px4.config index 2ffb972c0bf..90d35c64e82 100644 --- a/posix-configs/eagle/200qx/px4.config +++ b/posix-configs/eagle/200qx/px4.config @@ -1,4 +1,3 @@ -uorb start qshell start param set CBRK_SUPPLY_CHK 894281 param set SYS_AUTOSTART 4001 diff --git a/posix-configs/eagle/210qc/mainapp.config b/posix-configs/eagle/210qc/mainapp.config index fedc520c273..43495fd6796 100644 --- a/posix-configs/eagle/210qc/mainapp.config +++ b/posix-configs/eagle/210qc/mainapp.config @@ -4,7 +4,6 @@ # (px4-alias.sh is expected to be in the PATH) . px4-alias.sh -uorb start muorb start logger start -t -b 200 # Wait 1s before setting parameters for muorb to initialize diff --git a/posix-configs/eagle/210qc/px4.config b/posix-configs/eagle/210qc/px4.config index 0780e33a9bb..941a704607d 100644 --- a/posix-configs/eagle/210qc/px4.config +++ b/posix-configs/eagle/210qc/px4.config @@ -1,4 +1,3 @@ -uorb start qshell start param set CBRK_SUPPLY_CHK 894281 param set SYS_AUTOSTART 4001 diff --git a/posix-configs/eagle/flight/mainapp.config b/posix-configs/eagle/flight/mainapp.config index fedc520c273..43495fd6796 100644 --- a/posix-configs/eagle/flight/mainapp.config +++ b/posix-configs/eagle/flight/mainapp.config @@ -4,7 +4,6 @@ # (px4-alias.sh is expected to be in the PATH) . px4-alias.sh -uorb start muorb start logger start -t -b 200 # Wait 1s before setting parameters for muorb to initialize diff --git a/posix-configs/eagle/flight/px4.config b/posix-configs/eagle/flight/px4.config index 6b13a92bf07..0ae7e485034 100644 --- a/posix-configs/eagle/flight/px4.config +++ b/posix-configs/eagle/flight/px4.config @@ -1,4 +1,3 @@ -uorb start qshell start param set CBRK_SUPPLY_CHK 894281 param set SYS_AUTOSTART 4001 diff --git a/posix-configs/eagle/hil/mainapphil.config b/posix-configs/eagle/hil/mainapphil.config index 30ed3728fc9..edfc7d21b7f 100644 --- a/posix-configs/eagle/hil/mainapphil.config +++ b/posix-configs/eagle/hil/mainapphil.config @@ -1,4 +1,3 @@ -uorb start muorb start # Wait 1s before setting parameters for muorb to initialize sleep 1 diff --git a/posix-configs/eagle/hil/px4.config b/posix-configs/eagle/hil/px4.config index f8b8d9bb5c4..f1afab09db0 100644 --- a/posix-configs/eagle/hil/px4.config +++ b/posix-configs/eagle/hil/px4.config @@ -1,4 +1,3 @@ -uorb start qshell start param set CBRK_SUPPLY_CHK 894281 diff --git a/posix-configs/eagle/init/rcS b/posix-configs/eagle/init/rcS index 6ae93a882fa..387dba1ebba 100644 --- a/posix-configs/eagle/init/rcS +++ b/posix-configs/eagle/init/rcS @@ -4,7 +4,6 @@ # (px4-alias.sh is expected to be in the PATH) . px4-alias.sh -uorb start muorb start # We need to wait until the DSP side is ready before diff --git a/posix-configs/excelsior/mainapp.config b/posix-configs/excelsior/mainapp.config index 1d26ad5f7b8..c2a8740fc04 100644 --- a/posix-configs/excelsior/mainapp.config +++ b/posix-configs/excelsior/mainapp.config @@ -3,7 +3,6 @@ # (px4-alias.sh is expected to be in the PATH) . px4-alias.sh -uorb start muorb start logger start -e -t param set CBRK_SUPPLY_CHK 894281 diff --git a/posix-configs/excelsior/px4.config b/posix-configs/excelsior/px4.config index d0206e5f3d7..f634095b356 100644 --- a/posix-configs/excelsior/px4.config +++ b/posix-configs/excelsior/px4.config @@ -1,4 +1,3 @@ -uorb start qshell start param set CBRK_SUPPLY_CHK 894281 param set SYS_AUTOSTART 4001 diff --git a/posix-configs/ocpoc/px4.config b/posix-configs/ocpoc/px4.config index 82de41b52fb..e533c2b5a6f 100644 --- a/posix-configs/ocpoc/px4.config +++ b/posix-configs/ocpoc/px4.config @@ -3,8 +3,6 @@ # (px4-alias.sh is expected to be in the PATH) . px4-alias.sh -uorb start - param select /root/rootfs/eeprom/parameters if [ -f /root/rootfs/eeprom/parameters ] then diff --git a/posix-configs/rpi/pilotpi_fw.config b/posix-configs/rpi/pilotpi_fw.config index 56ec62f6e1f..977b27649ef 100644 --- a/posix-configs/rpi/pilotpi_fw.config +++ b/posix-configs/rpi/pilotpi_fw.config @@ -3,8 +3,6 @@ # (px4-alias.sh is expected to be in the PATH) . px4-alias.sh -uorb start - if [ -f eeprom/parameters ] then param load diff --git a/posix-configs/rpi/pilotpi_mc.config b/posix-configs/rpi/pilotpi_mc.config index 12b6816f245..d09bd21c0e9 100644 --- a/posix-configs/rpi/pilotpi_mc.config +++ b/posix-configs/rpi/pilotpi_mc.config @@ -3,8 +3,6 @@ # (px4-alias.sh is expected to be in the PATH) . px4-alias.sh -uorb start - if [ -f eeprom/parameters ] then param load diff --git a/posix-configs/rpi/px4.config b/posix-configs/rpi/px4.config index 55bdb73284a..d9a63b25aee 100644 --- a/posix-configs/rpi/px4.config +++ b/posix-configs/rpi/px4.config @@ -5,8 +5,6 @@ # navio config for a quad -uorb start - if [ -f eeprom/parameters ] then param load diff --git a/posix-configs/rpi/px4_fw.config b/posix-configs/rpi/px4_fw.config index 7f2f5c228ee..b814e624d0c 100644 --- a/posix-configs/rpi/px4_fw.config +++ b/posix-configs/rpi/px4_fw.config @@ -5,8 +5,6 @@ # navio config for FW -uorb start - if [ -f eeprom/parameters ] then param load diff --git a/posix-configs/rpi/px4_hil.config b/posix-configs/rpi/px4_hil.config index b9d945d2bd0..8d1abad5883 100644 --- a/posix-configs/rpi/px4_hil.config +++ b/posix-configs/rpi/px4_hil.config @@ -7,8 +7,6 @@ # connect to it with jMAVSim: # ./Tools/jmavsim_run.sh -q -i -p 14577 -r 250 -uorb start - if [ -f eeprom/parameters ] then param load diff --git a/posix-configs/rpi/px4_test.config b/posix-configs/rpi/px4_test.config index d31dc08ffe8..07562034f90 100644 --- a/posix-configs/rpi/px4_test.config +++ b/posix-configs/rpi/px4_test.config @@ -5,8 +5,6 @@ # navio config for simple testing -uorb start - if [ -f eeprom/parameters ] then param load diff --git a/src/lib/parameters/CMakeLists.txt b/src/lib/parameters/CMakeLists.txt index 3964ade4483..4978af39d1d 100644 --- a/src/lib/parameters/CMakeLists.txt +++ b/src/lib/parameters/CMakeLists.txt @@ -150,11 +150,7 @@ if (NOT "${PX4_BOARD}" MATCHES "px4_io") px4_parameters.hpp ) - if ("${CONFIG_SHMEM}" STREQUAL "1") - target_link_libraries(parameters PRIVATE px4_layer) - endif() - - target_link_libraries(parameters PRIVATE perf tinybson) + target_link_libraries(parameters PRIVATE perf tinybson px4_layer) target_compile_definitions(parameters PRIVATE -DMODULE_NAME="parameters") target_compile_options(parameters PRIVATE diff --git a/src/modules/events/CMakeLists.txt b/src/modules/events/CMakeLists.txt index a886cd5f4f1..8c54833d4ee 100644 --- a/src/modules/events/CMakeLists.txt +++ b/src/modules/events/CMakeLists.txt @@ -40,6 +40,4 @@ px4_add_module( send_event.cpp set_leds.cpp status_display.cpp - DEPENDS - modules__uORB ) diff --git a/src/modules/muorb/adsp/CMakeLists.txt b/src/modules/muorb/adsp/CMakeLists.txt index 7da84aa170f..de899113b05 100644 --- a/src/modules/muorb/adsp/CMakeLists.txt +++ b/src/modules/muorb/adsp/CMakeLists.txt @@ -35,4 +35,4 @@ px4_add_library(modules__muorb__adsp px4muorb.cpp uORBFastRpcChannel.cpp ) -target_include_directories(modules__muorb__adsp PRIVATE ${PX4_SOURCE_DIR}/src/modules/uORB) +target_include_directories(modules__muorb__adsp PRIVATE ${PX4_SOURCE_DIR}/platforms/common/uORB) diff --git a/src/systemcmds/uorb/CMakeLists.txt b/src/systemcmds/uorb/CMakeLists.txt new file mode 100644 index 00000000000..2c1362394b4 --- /dev/null +++ b/src/systemcmds/uorb/CMakeLists.txt @@ -0,0 +1,40 @@ +############################################################################ +# +# Copyright (c) 2021 PX4 Development Team. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name PX4 nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ +px4_add_module( + MODULE systemcmds__uorb + MAIN uorb + COMPILE_FLAGS + SRCS + uorb.cpp + DEPENDS + ) diff --git a/src/modules/uORB/uORBMain.cpp b/src/systemcmds/uorb/uorb.cpp similarity index 64% rename from src/modules/uORB/uORBMain.cpp rename to src/systemcmds/uorb/uorb.cpp index 84e05f34ff5..b9fb565c143 100644 --- a/src/modules/uORB/uORBMain.cpp +++ b/src/systemcmds/uorb/uorb.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2012-2015 PX4 Development Team. All rights reserved. + * Copyright (c) 2020 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,36 +33,49 @@ #include -#include "uORBManager.hpp" -#include "uORB.h" -#include "uORBCommon.hpp" +#include #include #include extern "C" { __EXPORT int uorb_main(int argc, char *argv[]); } -static uORB::DeviceMaster *g_dev = nullptr; -static void usage() +static void usage(); + +int uorb_main(int argc, char *argv[]) +{ + if (argc < 2) { + usage(); + return -1; + } + + if (!strcmp(argv[1], "start")) { + return uorb_start(); + + } else if (!strcmp(argv[1], "status")) { + return uorb_status(); + + } else if (!strcmp(argv[1], "top")) { + return uorb_top(argv + 2, argc - 2); + } + + usage(); + return 0; +} + +void usage() { PRINT_MODULE_DESCRIPTION( R"DESCR_STR( ### Description uORB is the internal pub-sub messaging system, used for communication between modules. -It is typically started as one of the very first modules and most other modules depend on it. - ### Implementation -No thread or work queue is needed, the module start only makes sure to initialize the shared global state. -Communication is done via shared memory. The implementation is asynchronous and lock-free, ie. a publisher does not wait for a subscriber and vice versa. This is achieved by having a separate buffer between a publisher and a subscriber. The code is optimized to minimize the memory footprint and the latency to exchange messages. -The interface is based on file descriptors: internally it uses `read`, `write` and `ioctl`. Except for the -publications, which use `orb_advert_t` handles, so that they can be used from interrupts as well (on NuttX). - Messages are defined in the `/msg` directory. They are converted into C/C++ code at build-time. If compiled with ORB_USE_PUBLISHER_RULES, a file with uORB publication rules can be used to configure which @@ -74,80 +87,9 @@ $ uorb top )DESCR_STR"); PRINT_MODULE_USAGE_NAME("uorb", "communication"); - PRINT_MODULE_USAGE_COMMAND("start"); PRINT_MODULE_USAGE_COMMAND_DESCR("status", "Print topic statistics"); PRINT_MODULE_USAGE_COMMAND_DESCR("top", "Monitor topic publication rates"); PRINT_MODULE_USAGE_PARAM_FLAG('a', "print all instead of only currently publishing topics with subscribers", true); PRINT_MODULE_USAGE_PARAM_FLAG('1', "run only once, then exit", true); PRINT_MODULE_USAGE_ARG(" []", "topic(s) to match (implies -a)", true); } - -int -uorb_main(int argc, char *argv[]) -{ - if (argc < 2) { - usage(); - return -EINVAL; - } - - /* - * Start/load the driver. - */ - if (!strcmp(argv[1], "start")) { - - if (g_dev != nullptr) { - PX4_WARN("already loaded"); - /* user wanted to start uorb, its already running, no error */ - return 0; - } - - if (!uORB::Manager::initialize()) { - PX4_ERR("uorb manager alloc failed"); - return -ENOMEM; - } - - /* create the driver */ - g_dev = uORB::Manager::get_instance()->get_device_master(); - - if (g_dev == nullptr) { - return -errno; - } - -#if !defined(__PX4_QURT) - /* FIXME: this fails on Snapdragon (see https://github.com/PX4/Firmware/issues/5406), - * so we disable logging messages to the ulog for now. This needs further investigations. - */ - px4_log_initialize(); -#endif - - return OK; - } - - /* - * Print driver information. - */ - if (!strcmp(argv[1], "status")) { - if (g_dev != nullptr) { - g_dev->printStatistics(); - - } else { - PX4_INFO("uorb is not running"); - } - - return OK; - } - - if (!strcmp(argv[1], "top")) { - if (g_dev != nullptr) { - g_dev->showTop(argv + 2, argc - 2); - - } else { - PX4_INFO("uorb is not running"); - } - - return OK; - } - - usage(); - return -EINVAL; -} diff --git a/src/templates/template_module/CMakeLists.txt b/src/templates/template_module/CMakeLists.txt index 19e9e5d3133..ddda8ba394e 100644 --- a/src/templates/template_module/CMakeLists.txt +++ b/src/templates/template_module/CMakeLists.txt @@ -36,7 +36,5 @@ px4_add_module( MAIN template_module SRCS template_module.cpp - DEPENDS - modules__uORB )