mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 16:23:56 -04:00
AP_NavEKF2: remove redundant check of beacon nullptr
thanks to muramura for spotting this
This commit is contained in:
parent
08619a96be
commit
fc5f4c20cd
@ -682,8 +682,7 @@ void NavEKF2_core::readRngBcnData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check that the beacon is healthy and has new data
|
// check that the beacon is healthy and has new data
|
||||||
if (beacon != nullptr &&
|
if (beacon->beacon_healthy(index) &&
|
||||||
beacon->beacon_healthy(index) &&
|
|
||||||
beacon->beacon_last_update_ms(index) != lastTimeRngBcn_ms[index])
|
beacon->beacon_last_update_ms(index) != lastTimeRngBcn_ms[index])
|
||||||
{
|
{
|
||||||
// set the timestamp, correcting for measurement delay and average intersampling delay due to the filter update rate
|
// set the timestamp, correcting for measurement delay and average intersampling delay due to the filter update rate
|
||||||
@ -712,7 +711,7 @@ void NavEKF2_core::readRngBcnData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if the beacon system has returned a 3D fix
|
// Check if the beacon system has returned a 3D fix
|
||||||
if (beacon != nullptr && beacon->get_vehicle_position_ned(beaconVehiclePosNED, beaconVehiclePosErr)) {
|
if (beacon->get_vehicle_position_ned(beaconVehiclePosNED, beaconVehiclePosErr)) {
|
||||||
rngBcnLast3DmeasTime_ms = imuSampleTime_ms;
|
rngBcnLast3DmeasTime_ms = imuSampleTime_ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user