diff --git a/boards/aerotenna/ocpoc/ubuntu.cmake b/boards/aerotenna/ocpoc/ubuntu.cmake index 3c3a0ba9d78..4f12dd719ce 100644 --- a/boards/aerotenna/ocpoc/ubuntu.cmake +++ b/boards/aerotenna/ocpoc/ubuntu.cmake @@ -78,6 +78,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello #hwtest # Hardware test px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/airmind/mindpx-v2/default.cmake b/boards/airmind/mindpx-v2/default.cmake index d3a21abb2be..e21396b2907 100644 --- a/boards/airmind/mindpx-v2/default.cmake +++ b/boards/airmind/mindpx-v2/default.cmake @@ -103,6 +103,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/atlflight/excelsior/default.cmake b/boards/atlflight/excelsior/default.cmake index 8398fdb80b5..2b11644bcd9 100644 --- a/boards/atlflight/excelsior/default.cmake +++ b/boards/atlflight/excelsior/default.cmake @@ -118,6 +118,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello #hwtest # Hardware test px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/atmel/same70xplained/default.cmake b/boards/atmel/same70xplained/default.cmake index bd5868ac766..67a0ddf6aa1 100644 --- a/boards/atmel/same70xplained/default.cmake +++ b/boards/atmel/same70xplained/default.cmake @@ -103,6 +103,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/auav/x21/default.cmake b/boards/auav/x21/default.cmake index 53d65b6d49a..90e9ca6dc56 100644 --- a/boards/auav/x21/default.cmake +++ b/boards/auav/x21/default.cmake @@ -108,6 +108,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/av/x-v1/default.cmake b/boards/av/x-v1/default.cmake index 071d854438f..5ba973bcde5 100644 --- a/boards/av/x-v1/default.cmake +++ b/boards/av/x-v1/default.cmake @@ -108,6 +108,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/beaglebone/blue/cross.cmake b/boards/beaglebone/blue/cross.cmake index 0fcde5a2df6..e984224bceb 100644 --- a/boards/beaglebone/blue/cross.cmake +++ b/boards/beaglebone/blue/cross.cmake @@ -76,6 +76,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello #hwtest # Hardware test px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/beaglebone/blue/native.cmake b/boards/beaglebone/blue/native.cmake index 74d4ed2a433..2078018c24f 100644 --- a/boards/beaglebone/blue/native.cmake +++ b/boards/beaglebone/blue/native.cmake @@ -74,6 +74,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello #hwtest # Hardware test px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/emlid/navio2/cross.cmake b/boards/emlid/navio2/cross.cmake index 0156864f2d4..21b05878468 100644 --- a/boards/emlid/navio2/cross.cmake +++ b/boards/emlid/navio2/cross.cmake @@ -86,6 +86,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello #hwtest # Hardware test px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/emlid/navio2/native.cmake b/boards/emlid/navio2/native.cmake index 1a6243ea8bf..d7fe1c66ad3 100644 --- a/boards/emlid/navio2/native.cmake +++ b/boards/emlid/navio2/native.cmake @@ -84,6 +84,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello #hwtest # Hardware test px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/nxp/hlite-v3/default.cmake b/boards/nxp/hlite-v3/default.cmake index 2a8b59fffaf..ec811e7ff76 100644 --- a/boards/nxp/hlite-v3/default.cmake +++ b/boards/nxp/hlite-v3/default.cmake @@ -105,6 +105,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/px4/fmu-v2/default.cmake b/boards/px4/fmu-v2/default.cmake index 6815e0edfdb..40d7778ddd3 100644 --- a/boards/px4/fmu-v2/default.cmake +++ b/boards/px4/fmu-v2/default.cmake @@ -112,6 +112,7 @@ px4_add_board( EXAMPLES #bottle_drop # OBC challenge #fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + #hello #hwtest # Hardware test #px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values #px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/px4/fmu-v2/lpe.cmake b/boards/px4/fmu-v2/lpe.cmake index cd03300c4b2..90df7f80e30 100644 --- a/boards/px4/fmu-v2/lpe.cmake +++ b/boards/px4/fmu-v2/lpe.cmake @@ -110,6 +110,7 @@ px4_add_board( EXAMPLES #bottle_drop # OBC challenge #fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + #hello #hwtest # Hardware test #px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values #px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/px4/fmu-v2/test.cmake b/boards/px4/fmu-v2/test.cmake index eba0c0711e8..598f518ed63 100644 --- a/boards/px4/fmu-v2/test.cmake +++ b/boards/px4/fmu-v2/test.cmake @@ -111,6 +111,7 @@ px4_add_board( EXAMPLES #bottle_drop # OBC challenge #fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + #hello #hwtest # Hardware test #px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values #px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/px4/fmu-v3/default.cmake b/boards/px4/fmu-v3/default.cmake index 4ff3370930a..ad90224f084 100644 --- a/boards/px4/fmu-v3/default.cmake +++ b/boards/px4/fmu-v3/default.cmake @@ -116,6 +116,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/px4/fmu-v3/rtps.cmake b/boards/px4/fmu-v3/rtps.cmake index 3fab9b87744..87369956cfa 100644 --- a/boards/px4/fmu-v3/rtps.cmake +++ b/boards/px4/fmu-v3/rtps.cmake @@ -117,6 +117,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/px4/fmu-v3/stackcheck.cmake b/boards/px4/fmu-v3/stackcheck.cmake index defddea269b..6015921753d 100644 --- a/boards/px4/fmu-v3/stackcheck.cmake +++ b/boards/px4/fmu-v3/stackcheck.cmake @@ -116,6 +116,7 @@ px4_add_board( EXAMPLES #bottle_drop # OBC challenge #fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + #hello #hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/px4/fmu-v4/default.cmake b/boards/px4/fmu-v4/default.cmake index 162528a12c7..c2b12f1dbfe 100644 --- a/boards/px4/fmu-v4/default.cmake +++ b/boards/px4/fmu-v4/default.cmake @@ -101,6 +101,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/px4/fmu-v4/rtps.cmake b/boards/px4/fmu-v4/rtps.cmake index 669a2bc1dad..8bf32a8d0b9 100644 --- a/boards/px4/fmu-v4/rtps.cmake +++ b/boards/px4/fmu-v4/rtps.cmake @@ -103,6 +103,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/px4/fmu-v4/stackcheck.cmake b/boards/px4/fmu-v4/stackcheck.cmake index 0dbddcd4d83..050ccee7f42 100644 --- a/boards/px4/fmu-v4/stackcheck.cmake +++ b/boards/px4/fmu-v4/stackcheck.cmake @@ -101,6 +101,7 @@ px4_add_board( EXAMPLES #bottle_drop # OBC challenge #fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + #hello #hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/px4/fmu-v4pro/default.cmake b/boards/px4/fmu-v4pro/default.cmake index f4522f1a68a..5a0b5ef4c82 100644 --- a/boards/px4/fmu-v4pro/default.cmake +++ b/boards/px4/fmu-v4pro/default.cmake @@ -115,6 +115,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/px4/fmu-v4pro/rtps.cmake b/boards/px4/fmu-v4pro/rtps.cmake index 6bc4fd78918..26e3fb530ad 100644 --- a/boards/px4/fmu-v4pro/rtps.cmake +++ b/boards/px4/fmu-v4pro/rtps.cmake @@ -116,6 +116,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/px4/fmu-v5/default.cmake b/boards/px4/fmu-v5/default.cmake index 81496ec3dfb..b1f6fe5d5d8 100644 --- a/boards/px4/fmu-v5/default.cmake +++ b/boards/px4/fmu-v5/default.cmake @@ -115,6 +115,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/px4/fmu-v5/rtps.cmake b/boards/px4/fmu-v5/rtps.cmake index 2d332581c7a..5d109105b87 100644 --- a/boards/px4/fmu-v5/rtps.cmake +++ b/boards/px4/fmu-v5/rtps.cmake @@ -117,6 +117,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/px4/fmu-v5/stackcheck.cmake b/boards/px4/fmu-v5/stackcheck.cmake index 3037667c933..9f8f42c52b7 100644 --- a/boards/px4/fmu-v5/stackcheck.cmake +++ b/boards/px4/fmu-v5/stackcheck.cmake @@ -116,6 +116,7 @@ px4_add_board( EXAMPLES #bottle_drop # OBC challenge #fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + #hello #hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/px4/raspberrypi/cross.cmake b/boards/px4/raspberrypi/cross.cmake index a779d8be856..15d75d07602 100644 --- a/boards/px4/raspberrypi/cross.cmake +++ b/boards/px4/raspberrypi/cross.cmake @@ -73,6 +73,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello #hwtest # Hardware test px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/px4/raspberrypi/native.cmake b/boards/px4/raspberrypi/native.cmake index 3da49dbe5bc..01257d2a9dc 100644 --- a/boards/px4/raspberrypi/native.cmake +++ b/boards/px4/raspberrypi/native.cmake @@ -71,6 +71,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello #hwtest # Hardware test px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/px4/sitl/default.cmake b/boards/px4/sitl/default.cmake index 6d959eecdce..d2c170f410b 100644 --- a/boards/px4/sitl/default.cmake +++ b/boards/px4/sitl/default.cmake @@ -74,6 +74,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello #hwtest # Hardware test px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/px4/sitl/rtps.cmake b/boards/px4/sitl/rtps.cmake index 09946119a70..4ce8d706549 100644 --- a/boards/px4/sitl/rtps.cmake +++ b/boards/px4/sitl/rtps.cmake @@ -76,6 +76,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello #hwtest # Hardware test px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/px4/sitl/test.cmake b/boards/px4/sitl/test.cmake index 075c9e47109..c53cd045bf4 100644 --- a/boards/px4/sitl/test.cmake +++ b/boards/px4/sitl/test.cmake @@ -74,6 +74,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello #hwtest # Hardware test px4_mavlink_debug # Tutorial code from https://px4.io/dev/debug_values px4_simple_app # Tutorial code from https://px4.io/dev/px4_simple_app diff --git a/boards/stm/32f4discovery/default.cmake b/boards/stm/32f4discovery/default.cmake index b054b08e533..835ac299da3 100644 --- a/boards/stm/32f4discovery/default.cmake +++ b/boards/stm/32f4discovery/default.cmake @@ -93,6 +93,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello #hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/boards/stm/nucleo-F767ZI/default.cmake b/boards/stm/nucleo-F767ZI/default.cmake index cd5a240857e..f824ad71c9a 100644 --- a/boards/stm/nucleo-F767ZI/default.cmake +++ b/boards/stm/nucleo-F767ZI/default.cmake @@ -102,6 +102,7 @@ px4_add_board( EXAMPLES bottle_drop # OBC challenge fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + hello hwtest # Hardware test #matlab_csv_serial #publisher diff --git a/platforms/posix/cmake/sitl_tests.cmake b/platforms/posix/cmake/sitl_tests.cmake index 80958afbe3e..11cca7cf1a4 100644 --- a/platforms/posix/cmake/sitl_tests.cmake +++ b/platforms/posix/cmake/sitl_tests.cmake @@ -115,7 +115,6 @@ sanitizer_fail_test_on_error(shutdown) # run arbitrary commands set(test_cmds - hello hrt_test cdev_test wqueue_test diff --git a/src/platforms/posix/tests/hello/CMakeLists.txt b/src/examples/hello/CMakeLists.txt similarity index 96% rename from src/platforms/posix/tests/hello/CMakeLists.txt rename to src/examples/hello/CMakeLists.txt index 77c4c8058bd..f77407194a7 100644 --- a/src/platforms/posix/tests/hello/CMakeLists.txt +++ b/src/examples/hello/CMakeLists.txt @@ -30,12 +30,14 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( - MODULE platforms__posix__tests__hello + MODULE examples__hello MAIN hello + COMPILE_FLAGS SRCS hello_main.cpp - hello_start_posix.cpp + hello_start.cpp hello_example.cpp DEPENDS ) diff --git a/src/platforms/posix/tests/hello/hello_example.cpp b/src/examples/hello/hello_example.cpp similarity index 99% rename from src/platforms/posix/tests/hello/hello_example.cpp rename to src/examples/hello/hello_example.cpp index 5d3cb76852f..6f7948a6bd3 100644 --- a/src/platforms/posix/tests/hello/hello_example.cpp +++ b/src/examples/hello/hello_example.cpp @@ -40,6 +40,7 @@ */ #include "hello_example.h" + #include #include diff --git a/src/platforms/posix/tests/hello/hello_example.h b/src/examples/hello/hello_example.h similarity index 100% rename from src/platforms/posix/tests/hello/hello_example.h rename to src/examples/hello/hello_example.h diff --git a/src/platforms/posix/tests/hello/hello_main.cpp b/src/examples/hello/hello_main.cpp similarity index 99% rename from src/platforms/posix/tests/hello/hello_main.cpp rename to src/examples/hello/hello_main.cpp index 69e8c21ec07..75bff11cd16 100644 --- a/src/platforms/posix/tests/hello/hello_main.cpp +++ b/src/examples/hello/hello_main.cpp @@ -37,9 +37,11 @@ * * @author Mark Charlebois */ + +#include "hello_example.h" + #include #include -#include "hello_example.h" #include int PX4_MAIN(int argc, char **argv) diff --git a/src/platforms/posix/tests/hello/hello_start_posix.cpp b/src/examples/hello/hello_start.cpp similarity index 94% rename from src/platforms/posix/tests/hello/hello_start_posix.cpp rename to src/examples/hello/hello_start.cpp index f553b985ea2..c94a20810d9 100644 --- a/src/platforms/posix/tests/hello/hello_start_posix.cpp +++ b/src/examples/hello/hello_start.cpp @@ -46,10 +46,6 @@ #include #include -#define SCHED_DEFAULT SCHED_FIFO -#define SCHED_PRIORITY_MAX sched_get_priority_max(SCHED_FIFO) -//#define SCHED_PRIORITY_DEFAULT sched_get_priority_max(SCHED_FIFO) - static int daemon_task; /* Handle of deamon task / thread */ //using namespace px4;