mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 09:23:35 +08:00
Replace CBRK_AIRSPD_CHK with SYS_HAS_NUM_ASPD
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -53,7 +53,6 @@
|
||||
#define CBRK_BUZZER_KEY 782097
|
||||
#define CBRK_SUPPLY_CHK_KEY 894281
|
||||
#define CBRK_IO_SAFETY_KEY 22027
|
||||
#define CBRK_AIRSPD_CHK_KEY 162128
|
||||
#define CBRK_FLIGHTTERM_KEY 121212
|
||||
#define CBRK_USB_CHK_KEY 197848
|
||||
#define CBRK_VTOLARMING_KEY 159753
|
||||
|
||||
@@ -69,21 +69,6 @@ PARAM_DEFINE_INT32(CBRK_SUPPLY_CHK, 0);
|
||||
*/
|
||||
PARAM_DEFINE_INT32(CBRK_IO_SAFETY, 22027);
|
||||
|
||||
/**
|
||||
* Circuit breaker for airspeed sensor
|
||||
*
|
||||
* Setting this parameter to 162128 will disable the check for an airspeed sensor.
|
||||
* The sensor driver will not be started and it cannot be calibrated.
|
||||
* WARNING: ENABLING THIS CIRCUIT BREAKER IS AT OWN RISK
|
||||
*
|
||||
* @reboot_required true
|
||||
* @min 0
|
||||
* @max 162128
|
||||
* @category Developer
|
||||
* @group Circuit Breaker
|
||||
*/
|
||||
PARAM_DEFINE_INT32(CBRK_AIRSPD_CHK, 0);
|
||||
|
||||
/**
|
||||
* Circuit breaker for flight termination
|
||||
*
|
||||
|
||||
@@ -58,5 +58,20 @@ bool param_modify_on_import(bson_node_t node)
|
||||
}
|
||||
}
|
||||
|
||||
// 2023-12-06: translate CBRK_AIRSPD_CHK-> SYS_HAS_NUM_ASPD
|
||||
{
|
||||
if (strcmp("CBRK_AIRSPD_CHK", node->name) == 0) {
|
||||
if (node->i32 == 162128) {
|
||||
node->i32 = 0;
|
||||
|
||||
strcpy(node->name, "SYS_HAS_NUM_ASPD");
|
||||
PX4_INFO("copying %s -> %s", "CBRK_AIRSPD_CHK", "SYS_HAS_NUM_ASPD");
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -216,6 +216,19 @@ PARAM_DEFINE_INT32(SYS_HAS_MAG, 1);
|
||||
*/
|
||||
PARAM_DEFINE_INT32(SYS_HAS_BARO, 1);
|
||||
|
||||
/**
|
||||
* Control if the vehicle has an airspeed sensor
|
||||
*
|
||||
* Set this to 0 if the board has no airspeed sensor.
|
||||
* If set to 0, the preflight checks will not check for the presence of an
|
||||
* airspeed sensor.
|
||||
*
|
||||
* @group System
|
||||
* @min 0
|
||||
* @max 1
|
||||
*/
|
||||
PARAM_DEFINE_INT32(SYS_HAS_NUM_ASPD, 0);
|
||||
|
||||
/**
|
||||
* Number of distance sensors to check being available
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user