Browse Source

ekf: pass a float by copy instead of a constant ref

master
bresch 3 years ago committed by Daniel Agar
parent
commit
917910f3e2
  1. 2
      src/modules/ekf2/EKF/ekf.h
  2. 2
      src/modules/ekf2/EKF/ekf_helper.cpp

2
src/modules/ekf2/EKF/ekf.h

@ -653,7 +653,7 @@ private: @@ -653,7 +653,7 @@ private:
void resetHorizontalPositionTo(const Vector2f &new_horz_pos);
void resetVerticalPositionTo(const float &new_vert_pos);
void resetVerticalPositionTo(float new_vert_pos);
void resetHeight();

2
src/modules/ekf2/EKF/ekf_helper.cpp

@ -229,7 +229,7 @@ void Ekf::resetHorizontalPositionTo(const Vector2f &new_horz_pos) @@ -229,7 +229,7 @@ void Ekf::resetHorizontalPositionTo(const Vector2f &new_horz_pos)
_state_reset_status.posNE_counter++;
}
void Ekf::resetVerticalPositionTo(const float &new_vert_pos)
void Ekf::resetVerticalPositionTo(const float new_vert_pos)
{
const float old_vert_pos = _state.pos(2);
_state.pos(2) = new_vert_pos;

Loading…
Cancel
Save