diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-28 03:02:57 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-01-16 07:48:18 +0100 |
commit | 6f04e4ca46e6f2dcd3eda63529a1bbd915f7676b (patch) | |
tree | 9aeb1332980c4285396457ad9f278495064549b5 /filter-kalman | |
parent | 3be3bb256f3e9362f8889f0532f875c5ad3b41fb (diff) |
clang-tidy fixes only
Maybe global `-Wcomma' is too harsh.
There should be no functional changes whatsoever.
Diffstat (limited to 'filter-kalman')
-rw-r--r-- | filter-kalman/kalman.cpp | 3 | ||||
-rw-r--r-- | filter-kalman/kalman.h | 14 |
2 files changed, 10 insertions, 7 deletions
diff --git a/filter-kalman/kalman.cpp b/filter-kalman/kalman.cpp index f88d7f90..1960e0f6 100644 --- a/filter-kalman/kalman.cpp +++ b/filter-kalman/kalman.cpp @@ -192,7 +192,6 @@ void kalman::reset() for (int i = 0; i < 6; i++) { last_input[i] = 0; } - first_run = true; dt_since_last_input = 0; prev_slider_pos[0] = s.noise_pos_slider_value; @@ -311,7 +310,7 @@ double settings::map_slider_value(const slider_value& v_) | left_side_log10 */ - const int k = v * num_divisions; // in which division are we?! + const int k = int(v * num_divisions); // in which division are we?! const double f = v * num_divisions - k; // where in the division are we?! const double ff = f * 9. + 1.; const double multiplier = int(ff * 10.) / 10.; diff --git a/filter-kalman/kalman.h b/filter-kalman/kalman.h index 30f9e90f..ad5e3e20 100644 --- a/filter-kalman/kalman.h +++ b/filter-kalman/kalman.h @@ -109,15 +109,19 @@ public: void center() override { reset(); } module_status initialize() override { return status_ok(); } - PoseVector last_input; - Timer timer; - bool first_run; double dt_since_last_input; - settings s; + PoseVector last_input; KalmanFilter kf; KalmanProcessNoiseScaler kf_adaptive_process_noise_cov; DeadzoneFilter dz_filter; - slider_value prev_slider_pos[2]; + settings s; + slider_value prev_slider_pos[2] { + *s.noise_pos_slider_value, + *s.noise_rot_slider_value, + }; + Timer timer; + + bool first_run = true; }; class kalmanDll : public Metadata |