mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 04:00:34 +08:00
Allow negative differential pressure if parameter enabled (#24434)
This commit is contained in:
@@ -168,7 +168,7 @@ int do_airspeed_calibration(orb_advert_t *mavlink_log_pub)
|
||||
/* do not allow negative values */
|
||||
calibration_log_critical(mavlink_log_pub, "[cal] Negative pressure difference detected (%d Pa)",
|
||||
(int)differential_pressure_pa);
|
||||
calibration_log_critical(mavlink_log_pub, "[cal] Swap static and dynamic ports!");
|
||||
calibration_log_critical(mavlink_log_pub, "[cal] Swap static and dynamic ports or set SENS_DPRES_REV");
|
||||
|
||||
/* the user setup is wrong, wipe the calibration to force a proper re-calibration */
|
||||
diff_pres_offset = 0.0f;
|
||||
|
||||
@@ -87,6 +87,18 @@ PARAM_DEFINE_FLOAT(CAL_AIR_TUBED_MM, 1.5f);
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(SENS_DPRES_OFF, 0.0f);
|
||||
|
||||
/**
|
||||
* Reverse differential pressure sensor readings
|
||||
*
|
||||
* Reverse the raw measurements of all differential pressure sensors.
|
||||
* This can be enabled if the sensors have static and dynamic ports swapped.
|
||||
*
|
||||
* @category system
|
||||
* @group Sensor Calibration
|
||||
* @boolean
|
||||
*/
|
||||
PARAM_DEFINE_INT32(SENS_DPRES_REV, 0);
|
||||
|
||||
/**
|
||||
* Differential pressure sensor analog scaling
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user