AP_Baro: fix example: fixing missing objects

This fix  a crash running on beaglebone boards reported
       https://github.com/ArduPilot/ardupilot/issues/21321
This commit is contained in:
juvinski 2023-08-27 21:12:45 -03:00 committed by Peter Barker
parent 8de103d6ee
commit 413452aa1a
1 changed files with 8 additions and 1 deletions

View File

@ -22,12 +22,19 @@
#include <AP_HAL/AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#include <GCS_MAVLink/GCS_Dummy.h> #include <GCS_MAVLink/GCS_Dummy.h>
#include <AP_ExternalAHRS/AP_ExternalAHRS.h> #include <AP_ExternalAHRS/AP_ExternalAHRS.h>
#include <AP_Logger/AP_Logger.h>
#include <AP_AHRS/AP_AHRS.h>
const AP_HAL::HAL &hal = AP_HAL::get_HAL(); const AP_HAL::HAL &hal = AP_HAL::get_HAL();
// create barometer object // create barometer object
static AP_Baro barometer; 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 #if HAL_EXTERNAL_AHRS_ENABLED
static AP_ExternalAHRS eAHRS; static AP_ExternalAHRS eAHRS;
#endif // HAL_EXTERNAL_AHRS_ENABLED #endif // HAL_EXTERNAL_AHRS_ENABLED