refactor(sensors)!: replace SENS_DPRES_OFF with per-sensor calibration

SENS_DPRES_OFF applied one zero offset to whichever airspeed sensor
happened to come first, which cannot work once there is more than one
sensor. It is superseded by CAL_DPRESx_OFF.

BREAKING CHANGE: SENS_DPRES_OFF is removed. Ground stations that read it
to decide whether airspeed has been calibrated must check CAL_DPRES0_ID
instead, matching how CAL_MAG0_ID, CAL_GYRO0_ID and CAL_ACC0_ID are
already used.

Signed-off-by: mahima-yoga <mahima@auterion.com>
This commit is contained in:
mahima-yoga
2026-09-30 11:47:40 +02:00
committed by Alexander Lerach
parent 9b717cbc7c
commit 00381e0dc5
8 changed files with 13 additions and 14 deletions
@@ -80,7 +80,6 @@ param set-default MAV_TYPE 22
# set SYS_HITL to 2 to start the SIH and avoid sensors startup
# param set-default SYS_HITL 2
param set-default SENS_DPRES_OFF 0.001
param set SIH_T_MAX 2
param set SIH_Q_MAX 0.0165
-1
View File
@@ -155,7 +155,6 @@ param set-default CAL_MAG1_ID 197644
param set-default CAL_MAG1_PRIO 50
param set-default SENS_BOARD_X_OFF 0.000001
param set-default SENS_DPRES_OFF 0.001
param set-default BAT1_N_CELLS 4
@@ -64,7 +64,6 @@ param set-default SYS_HITL 2
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
param set-default SENS_DPRES_OFF 0.001
# tailsitter is equipped with two forward propellers
param set SIH_F_T_MAX 2
@@ -76,7 +76,6 @@ param set-default SYS_HITL 2
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
param set-default SENS_DPRES_OFF 0.001
# quadrotor propellers
param set SIH_T_MAX 2
+12
View File
@@ -75,6 +75,18 @@ param_modify_on_import_ret param_modify_on_import(bson_node_t node)
}
}
// 2026-09-16: SENS_DPRES_OFF (single global zero offset) replaced by the per-sensor
// CAL_DPRESx_OFF calibration. The value is carried into slot 0; the matching
// CAL_DPRES0_ID is claimed at runtime by the first airspeed sensor, because the device
// ID is not known at import time.
{
if (strcmp("SENS_DPRES_OFF", node->name) == 0) {
strcpy(node->name, "CAL_DPRES0_OFF");
PX4_INFO("copying %s -> %s", "SENS_DPRES_OFF", "CAL_DPRES0_OFF");
return param_modify_on_import_ret::PARAM_MODIFIED;
}
}
// 2024-04-15 SYS_MC_EST_GROUP removed
if ((node->type == bson_type_t::BSON_INT32) && (strcmp("SYS_MC_EST_GROUP", node->name) == 0)) {
@@ -425,7 +425,6 @@ MavlinkParametersManager::send()
param_find("SENS_BOARD_X_OFF");
param_find("SENS_BOARD_Y_OFF");
param_find("SENS_BOARD_Z_OFF");
param_find("SENS_DPRES_OFF");
param_find("TRIG_MODE");
param_find("UAVCAN_ENABLE");
-8
View File
@@ -2,14 +2,6 @@ module_name: sensors
parameters:
- group: Sensor Calibration
definitions:
SENS_DPRES_OFF:
description:
short: Differential pressure sensor offset
long: The offset (zero-reading) in Pascal
category: System
type: float
default: 0.0
volatile: true
SENS_DPRES_REV:
description:
short: Reverse differential pressure sensor readings
+1 -1
View File
@@ -891,7 +891,7 @@ do_show_print_for_airframe(void *arg, param_t param)
}
if (!strncmp(p_name, "RC", 2) || !strncmp(p_name, "TC_", 3) || !strncmp(p_name, "CAL_", 4) ||
!strcmp(p_name, "SENS_DPRES_OFF") || !strcmp(p_name, "MAV_TYPE")) {
!strcmp(p_name, "MAV_TYPE")) {
return;
}