mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 06:43:34 +08:00
Remove dangerous _primary_hgt_source variable
This commit is contained in:
committed by
Mathieu Bresciani
parent
66f707ede0
commit
042d9b6615
+1
-1
@@ -90,7 +90,7 @@ bool Ekf::collect_gps(const gps_message &gps)
|
||||
_gps_origin_epv = gps.epv;
|
||||
|
||||
// if the user has selected GPS as the primary height source, switch across to using it
|
||||
if (_primary_hgt_source == VDIST_SENSOR_GPS) {
|
||||
if (_params.vdist_sensor_type == VDIST_SENSOR_GPS) {
|
||||
ECL_INFO_TIMESTAMPED("EKF GPS checks passed (WGS-84 origin set, using GPS height)");
|
||||
_control_status.flags.baro_hgt = false;
|
||||
_control_status.flags.gps_hgt = true;
|
||||
|
||||
Reference in New Issue
Block a user