projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/ao_button.c: Support up to 16 buttons
[fw/altos]
/
src
/
kernel
/
ao_sample.h
diff --git
a/src/kernel/ao_sample.h
b/src/kernel/ao_sample.h
index 2ec998bd257adb4a9274447d4111504526c3d829..5ae389bec7c636e4356b1d0c4042fd7fee5e25b0 100644
(file)
--- a/
src/kernel/ao_sample.h
+++ b/
src/kernel/ao_sample.h
@@
-3,7
+3,8
@@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-94,7
+95,12
@@
typedef int16_t ao_v_t;
/*
* Above this speed, baro measurements are unreliable
*/
/*
* Above this speed, baro measurements are unreliable
*/
-#define AO_MAX_BARO_SPEED 200
+#define AO_MAX_BARO_SPEED 248
+
+/* The maximum amount (in a range of 0-256) to de-rate the
+ * baro sensor data based on speed.
+ */
+#define AO_MAX_SPEED_DISTRUST 160
#define ACCEL_NOSE_UP (ao_accel_2g >> 2)
#define ACCEL_NOSE_UP (ao_accel_2g >> 2)
@@
-140,7
+146,10
@@
extern __pdata accel_t ao_sample_accel_through;
extern __pdata gyro_t ao_sample_roll;
extern __pdata gyro_t ao_sample_pitch;
extern __pdata gyro_t ao_sample_yaw;
extern __pdata gyro_t ao_sample_roll;
extern __pdata gyro_t ao_sample_pitch;
extern __pdata gyro_t ao_sample_yaw;
+#define AO_NUM_ORIENT 64
extern __pdata angle_t ao_sample_orient;
extern __pdata angle_t ao_sample_orient;
+extern __pdata angle_t ao_sample_orients[AO_NUM_ORIENT];
+extern __pdata uint8_t ao_sample_orient_pos;
#endif
void ao_sample_init(void);
#endif
void ao_sample_init(void);
@@
-174,7
+183,9
@@
extern __xdata ao_v_t ao_max_height; /* max of ao_height */
extern __xdata ao_v_t ao_avg_height; /* running average of height */
extern __pdata ao_v_t ao_error_h;
extern __xdata ao_v_t ao_avg_height; /* running average of height */
extern __pdata ao_v_t ao_error_h;
+#if !HAS_ACCEL
extern __pdata ao_v_t ao_error_h_sq_avg;
extern __pdata ao_v_t ao_error_h_sq_avg;
+#endif
#if HAS_ACCEL
extern __pdata ao_v_t ao_error_a;
#if HAS_ACCEL
extern __pdata ao_v_t ao_error_a;