From 413452aa1aa6a178c13ba365f12776ec4f1a147f Mon Sep 17 00:00:00 2001 From: juvinski Date: Sun, 27 Aug 2023 21:12:45 -0300 Subject: [PATCH] AP_Baro: fix example: fixing missing objects This fix a crash running on beaglebone boards reported https://github.com/ArduPilot/ardupilot/issues/21321 --- libraries/AP_Baro/examples/BARO_generic/BARO_generic.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Baro/examples/BARO_generic/BARO_generic.cpp b/libraries/AP_Baro/examples/BARO_generic/BARO_generic.cpp index 1e82b84080..ebcee731af 100644 --- a/libraries/AP_Baro/examples/BARO_generic/BARO_generic.cpp +++ b/libraries/AP_Baro/examples/BARO_generic/BARO_generic.cpp @@ -22,12 +22,19 @@ #include #include #include - +#include +#include const AP_HAL::HAL &hal = AP_HAL::get_HAL(); // create barometer object static AP_Baro barometer; + +// creating other objects +static AP_Int32 log_bitmask; +static AP_Logger logger; +static AP_AHRS ahrs; + #if HAL_EXTERNAL_AHRS_ENABLED static AP_ExternalAHRS eAHRS; #endif // HAL_EXTERNAL_AHRS_ENABLED