Skip to content

Commit

Permalink
AP_Baro: fix example: fixing missing objects
Browse files Browse the repository at this point in the history
       This fix  a crash running on beaglebone boards reported
       #21321
  • Loading branch information
juvinski authored and peterbarker committed Jun 5, 2024
1 parent 78fcf70 commit 6f23fdc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libraries/AP_Baro/examples/BARO_generic/BARO_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,19 @@
#include <AP_HAL/AP_HAL.h>
#include <GCS_MAVLink/GCS_Dummy.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();

// create barometer object
static AP_Baro barometer;

// creating other objects
static AP_Int32 log_bitmask;
static AP_Logger logger{log_bitmask};
static AP_AHRS ahrs;

#if HAL_EXTERNAL_AHRS_ENABLED
static AP_ExternalAHRS eAHRS;
#endif // HAL_EXTERNAL_AHRS_ENABLED
Expand Down

0 comments on commit 6f23fdc

Please sign in to comment.