projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Switch all tick variables to AO_TICK_TYPE/AO_TICK_SIGNED
[fw/altos]
/
src
/
kernel
/
ao_sample.c
diff --git
a/src/kernel/ao_sample.c
b/src/kernel/ao_sample.c
index 9ddbfd8eace7453a6f359267a866cf0972b40c61..e3b5e084d8f4c52ec454e30739910bfada8a9912 100644
(file)
--- a/
src/kernel/ao_sample.c
+++ b/
src/kernel/ao_sample.c
@@
-35,7
+35,7
@@
#define ACCEL_TYPE int16_t
#endif
#define ACCEL_TYPE int16_t
#endif
-
uint16_t
ao_sample_tick; /* time of last data */
+
AO_TICK_TYPE
ao_sample_tick; /* time of last data */
#if HAS_BARO
pres_t ao_sample_pres;
alt_t ao_sample_alt;
#if HAS_BARO
pres_t ao_sample_pres;
alt_t ao_sample_alt;
@@
-274,7
+274,7
@@
static void
ao_sample_rotate(void)
{
#ifdef AO_FLIGHT_TEST
ao_sample_rotate(void)
{
#ifdef AO_FLIGHT_TEST
- float dt = (
int16_t
) (ao_sample_tick - ao_sample_prev_tick) / TIME_DIV;
+ float dt = (
AO_TICK_SIGNED
) (ao_sample_tick - ao_sample_prev_tick) / TIME_DIV;
#else
static const float dt = 1/TIME_DIV;
#endif
#else
static const float dt = 1/TIME_DIV;
#endif