mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-02 10:23:25 +08:00
AP_DAL: stop using airspeed_sensor_enabled from AP_DAL
this is an input to the EKF, but also populated based on the AHRS current state. Make the data come from the sensor, not the *output* of the AHRS backends!
This commit is contained in:
committed by
Peter Barker
parent
b469253c1e
commit
8ad9ae2314
@@ -76,7 +76,6 @@ void AP_DAL::start_frame(AP_DAL::FrameType frametype)
|
||||
_RFRN.fly_forward = ahrs.get_fly_forward();
|
||||
_RFRN.takeoff_expected = ahrs.get_takeoff_expected();
|
||||
_RFRN.touchdown_expected = ahrs.get_touchdown_expected();
|
||||
_RFRN.ahrs_airspeed_sensor_enabled = ahrs.airspeed_sensor_enabled(ahrs.get_active_airspeed_index());
|
||||
_RFRN.available_memory = hal.util->available_memory();
|
||||
_RFRN.ahrs_trim = ahrs.get_trim();
|
||||
#if AP_OPTICALFLOW_ENABLED
|
||||
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
ARMED = (1U<<0),
|
||||
UNUSED = (1U<<1),
|
||||
FLY_FORWARD = (1U<<2),
|
||||
AHRS_AIRSPEED_SENSOR_ENABLED = (1U<<3),
|
||||
AHRS_AIRSPEED_SENSOR_ENABLED_UNUSED = (1U<<3),
|
||||
OPTICALFLOW_ENABLED = (1U<<4),
|
||||
WHEELENCODER_ENABLED = (1U<<5),
|
||||
TAKEOFF_EXPECTED = (1U<<6),
|
||||
@@ -175,11 +175,6 @@ public:
|
||||
|
||||
AP_DAL_Compass &compass() { return _compass; }
|
||||
|
||||
// random methods that AP_NavEKF3 wants to call on AHRS:
|
||||
bool airspeed_sensor_enabled(void) const {
|
||||
return _RFRN.ahrs_airspeed_sensor_enabled;
|
||||
}
|
||||
|
||||
// get apparent to true airspeed ratio; this is a sensor input
|
||||
// to the EKFs, captured from the barometer's atmosphere model
|
||||
// in start_frame():
|
||||
|
||||
@@ -104,7 +104,7 @@ struct log_RFRN {
|
||||
uint8_t armed:1;
|
||||
uint8_t unused:1; // was get_compass_is_null
|
||||
uint8_t fly_forward:1;
|
||||
uint8_t ahrs_airspeed_sensor_enabled:1;
|
||||
uint8_t ahrs_airspeed_sensor_enabled_unused:1;
|
||||
uint8_t opticalflow_enabled:1;
|
||||
uint8_t wheelencoder_enabled:1;
|
||||
uint8_t takeoff_expected:1;
|
||||
|
||||
Reference in New Issue
Block a user