Skip to content

Commit

Permalink
GCS_MAVLink: fix includes to ap_message
Browse files Browse the repository at this point in the history
1. "GSC_config.h" is needed for HIGHRES_IMU_ENABLED flag.
2. Baro API should be consistent with 4.5.6 version
  • Loading branch information
KoehlerT authored and lida2003 committed Sep 19, 2024
1 parent 284fa1d commit 52d21ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/GCS_MAVLink/GCS_Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2149,7 +2149,7 @@ void GCS_MAVLINK::send_highres_imu()
const AP_Baro &barometer = AP::baro();
reply.abs_pressure = barometer.get_pressure() * 0.01f;
reply.temperature = barometer.get_temperature();
reply.pressure_alt = barometer.get_altitude_AMSL();
reply.pressure_alt = barometer.get_altitude();
reply.diff_pressure = reply.abs_pressure - barometer.get_ground_pressure() * 0.01f;
reply.fields_updated |= (HIGHRES_IMU_UPDATED_ABS_PRESSURE | HIGHRES_IMU_UPDATED_DIFF_PRESSURE |
HIGHRES_IMU_UPDATED_PRESSURE_ALT | HIGHRES_IMU_UPDATED_TEMPERATURE);
Expand Down
4 changes: 4 additions & 0 deletions libraries/GCS_MAVLink/ap_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

#pragma once

#include "GCS_config.h"

#include <AP_AHRS/AP_AHRS_config.h>

enum ap_message : uint8_t {
MSG_HEARTBEAT,
MSG_ATTITUDE,
Expand Down

0 comments on commit 52d21ba

Please sign in to comment.