diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-06-04 10:31:23 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-06-04 10:31:23 +0200 |
commit | 5aef22310e0dbec9f758e4cf1df5ad93cbd989ad (patch) | |
tree | d1f24fe08d9d79161ebb9dc5fab9fbb3458e5942 /src/modules/ekf_att_pos_estimator/estimator.cpp | |
parent | 19154f29d822afdc0a33bf3be55fab63b32f23c5 (diff) | |
download | px4-firmware-5aef22310e0dbec9f758e4cf1df5ad93cbd989ad.tar.gz px4-firmware-5aef22310e0dbec9f758e4cf1df5ad93cbd989ad.tar.bz2 px4-firmware-5aef22310e0dbec9f758e4cf1df5ad93cbd989ad.zip |
Ensure states are actually copied in non-error mode
Diffstat (limited to 'src/modules/ekf_att_pos_estimator/estimator.cpp')
-rw-r--r-- | src/modules/ekf_att_pos_estimator/estimator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/ekf_att_pos_estimator/estimator.cpp b/src/modules/ekf_att_pos_estimator/estimator.cpp index 5ac6b079f..89e137adc 100644 --- a/src/modules/ekf_att_pos_estimator/estimator.cpp +++ b/src/modules/ekf_att_pos_estimator/estimator.cpp @@ -2610,6 +2610,12 @@ void AttPosEKF::ZeroVariables() void AttPosEKF::GetFilterState(struct ekf_status_report *state) { + + // Copy states + for (unsigned i = 0; i < n_states; i++) { + current_ekf_state.states[i] = states[i]; + } + memcpy(state, ¤t_ekf_state, sizeof(*state)); } |