projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos]
/
src
/
kernel
/
ao_kalman.c
diff --git
a/src/kernel/ao_kalman.c
b/src/kernel/ao_kalman.c
index 168812b750aa70c03eeca94fa3a8cd6b20378e62..5f32eb7275de8357d8bb50a80680644dee4817e9 100644
(file)
--- a/
src/kernel/ao_kalman.c
+++ b/
src/kernel/ao_kalman.c
@@
-178,7
+178,7
@@
ao_kalman_err_accel(void)
accel = (ao_config.accel_plus_g - ao_sample_accel) * ao_accel_scale;
/* Can't use ao_accel here as it is the pre-prediction value still */
accel = (ao_config.accel_plus_g - ao_sample_accel) * ao_accel_scale;
/* Can't use ao_accel here as it is the pre-prediction value still */
- ao_error_a = (a
ccel - ao_k_accel) >> 16
;
+ ao_error_a = (a
o_v_t) ((accel - ao_k_accel) >> 16)
;
}
#if !defined(FORCE_ACCEL) && HAS_BARO
}
#if !defined(FORCE_ACCEL) && HAS_BARO
@@
-314,9
+314,9
@@
ao_kalman(void)
ao_kalman_correct_accel();
#endif
#endif
ao_kalman_correct_accel();
#endif
#endif
- ao_height = from_fix(ao_k_height);
- ao_speed = from_fix(ao_k_speed);
- ao_accel = from_fix(ao_k_accel);
+ ao_height =
(ao_v_t)
from_fix(ao_k_height);
+ ao_speed =
(ao_v_t)
from_fix(ao_k_speed);
+ ao_accel =
(ao_v_t)
from_fix(ao_k_accel);
if (ao_height > ao_max_height)
ao_max_height = ao_height;
#if HAS_BARO
if (ao_height > ao_max_height)
ao_max_height = ao_height;
#if HAS_BARO
@@
-331,5
+331,5
@@
ao_kalman(void)
ao_avg_height = (ao_avg_height_scaled + 7) >> 4;
else
#endif
ao_avg_height = (ao_avg_height_scaled + 7) >> 4;
else
#endif
- ao_avg_height = (ao_
avg_height_scaled + 63) >> 7
;
+ ao_avg_height = (ao_
v_t) ((ao_avg_height_scaled + 63) >> 7)
;
}
}