mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 07:20:40 +08:00
remove avoidance library and logic
Signed-off-by: Silvan <silvan@auterion.com>
This commit is contained in:
@@ -1717,8 +1717,6 @@ void Commander::updateParameters()
|
||||
_vehicle_status.system_type = value_int32;
|
||||
}
|
||||
|
||||
_vehicle_status.avoidance_system_required = _param_com_obs_avoid.get();
|
||||
|
||||
_auto_disarm_killed.set_hysteresis_time_from(false, _param_com_kill_disarm.get() * 1_s);
|
||||
|
||||
const bool is_rotary = is_rotary_wing(_vehicle_status) || (is_vtol(_vehicle_status)
|
||||
@@ -1799,9 +1797,6 @@ void Commander::run()
|
||||
_status_changed = true;
|
||||
}
|
||||
|
||||
/* Update OA parameter */
|
||||
_vehicle_status.avoidance_system_required = _param_com_obs_avoid.get();
|
||||
|
||||
handlePowerButtonState();
|
||||
|
||||
systemPowerUpdate();
|
||||
@@ -2814,16 +2809,6 @@ void Commander::dataLinkCheck()
|
||||
_vehicle_status.open_drone_id_system_present = true;
|
||||
_vehicle_status.open_drone_id_system_healthy = healthy;
|
||||
}
|
||||
|
||||
if (telemetry.heartbeat_component_obstacle_avoidance) {
|
||||
if (_avoidance_system_lost) {
|
||||
_avoidance_system_lost = false;
|
||||
_status_changed = true;
|
||||
}
|
||||
|
||||
_datalink_last_heartbeat_avoidance_system = telemetry.timestamp;
|
||||
_vehicle_status.avoidance_system_valid = telemetry.avoidance_system_healthy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2875,17 +2860,6 @@ void Commander::dataLinkCheck()
|
||||
_open_drone_id_system_lost = true;
|
||||
_status_changed = true;
|
||||
}
|
||||
|
||||
// AVOIDANCE SYSTEM state check (only if it is enabled)
|
||||
if (_vehicle_status.avoidance_system_required && !_onboard_controller_lost) {
|
||||
// if heartbeats stop
|
||||
if (!_avoidance_system_lost && (_datalink_last_heartbeat_avoidance_system > 0)
|
||||
&& (hrt_elapsed_time(&_datalink_last_heartbeat_avoidance_system) > 5_s)) {
|
||||
|
||||
_avoidance_system_lost = true;
|
||||
_vehicle_status.avoidance_system_valid = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Commander::battery_status_check()
|
||||
|
||||
Reference in New Issue
Block a user