mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-29 19:57:12 +08:00
refactor(sensor_airspeed_sim): remove previous airspeed failure implementation
This commit is contained in:
@@ -108,7 +108,6 @@ void SensorAirspeedSim::Run()
|
|||||||
updateParams();
|
updateParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_sim_failure.get() == 0) {
|
|
||||||
if (_vehicle_local_position_sub.updated() && _vehicle_global_position_sub.updated()
|
if (_vehicle_local_position_sub.updated() && _vehicle_global_position_sub.updated()
|
||||||
&& _vehicle_attitude_sub.updated()) {
|
&& _vehicle_attitude_sub.updated()) {
|
||||||
|
|
||||||
@@ -151,7 +150,6 @@ void SensorAirspeedSim::Run()
|
|||||||
_differential_pressure_pub.publish(differential_pressure);
|
_differential_pressure_pub.publish(differential_pressure);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
perf_end(_loop_perf);
|
perf_end(_loop_perf);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,8 +91,4 @@ private:
|
|||||||
uORB::PublicationMulti<differential_pressure_s> _differential_pressure_pub{ORB_ID(differential_pressure)};
|
uORB::PublicationMulti<differential_pressure_s> _differential_pressure_pub{ORB_ID(differential_pressure)};
|
||||||
|
|
||||||
perf_counter_t _loop_perf{perf_alloc(PC_ELAPSED, MODULE_NAME": cycle")};
|
perf_counter_t _loop_perf{perf_alloc(PC_ELAPSED, MODULE_NAME": cycle")};
|
||||||
|
|
||||||
DEFINE_PARAMETERS(
|
|
||||||
(ParamInt<px4::params::SIM_ARSPD_FAIL>) _sim_failure
|
|
||||||
)
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,14 +13,3 @@ parameters:
|
|||||||
reboot_required: true
|
reboot_required: true
|
||||||
min: 0
|
min: 0
|
||||||
max: 1
|
max: 1
|
||||||
SIM_ARSPD_FAIL:
|
|
||||||
description:
|
|
||||||
short: Dynamically simulate failure of airspeed sensor instance
|
|
||||||
type: enum
|
|
||||||
values:
|
|
||||||
0: Disabled
|
|
||||||
1: Enabled
|
|
||||||
default: 0
|
|
||||||
reboot_required: true
|
|
||||||
min: 0
|
|
||||||
max: 1
|
|
||||||
|
|||||||
Reference in New Issue
Block a user