Skip to content

Commit

Permalink
AP_NavEKF3: do not log DefaultAirspeed if logging not started
Browse files Browse the repository at this point in the history
if we are not going to use this value ourselves then we certainly should not add it to the replay log
  • Loading branch information
peterbarker authored and tridge committed Aug 27, 2024
1 parent 00dc150 commit 4e27c51
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions libraries/AP_NavEKF3/AP_NavEKF3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2043,12 +2043,15 @@ void NavEKF3::updateLaneSwitchPosDownResetData(uint8_t new_primary, uint8_t old_
// Writes the default equivalent airspeed and 1-sigma uncertainty in m/s to be used in forward flight if a measured airspeed is required and not available.
void NavEKF3::writeDefaultAirSpeed(float airspeed, float uncertainty)
{
// ignore any data if the EKF is not started
if (!core) {
return;
}

AP::dal().log_writeDefaultAirSpeed3(airspeed, uncertainty);

if (core) {
for (uint8_t i=0; i<num_cores; i++) {
core[i].writeDefaultAirSpeed(airspeed, uncertainty);
}
for (uint8_t i=0; i<num_cores; i++) {
core[i].writeDefaultAirSpeed(airspeed, uncertainty);
}
}

Expand Down

0 comments on commit 4e27c51

Please sign in to comment.