projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drivers/ao_packet: Switch time values to AO_TICK_TYPE
[fw/altos]
/
src
/
drivers
/
ao_adxl375.h
diff --git
a/src/drivers/ao_adxl375.h
b/src/drivers/ao_adxl375.h
index a1ed216dc447abfefe8b139a60c64aac9e0c5f54..fe448fd0e27857d06592188d5aa38548ca5b6348 100644
(file)
--- a/
src/drivers/ao_adxl375.h
+++ b/
src/drivers/ao_adxl375.h
@@
-93,6
+93,8
@@
#define AO_ADXL375_FIFO_STATUS 0x39
#define AO_ADXL375_FIFO_STATUS 0x39
+#define ADXL375_ACCEL_FULLSCALE 200
+
struct ao_adxl375_sample {
int16_t x;
int16_t y;
struct ao_adxl375_sample {
int16_t x;
int16_t y;
@@
-101,6
+103,8
@@
struct ao_adxl375_sample {
extern struct ao_adxl375_sample ao_adxl375_current;
extern struct ao_adxl375_sample ao_adxl375_current;
+#define ao_adxl375_accel_to_sample(accel) ((accel_t) (accel) * (4095.0f / (ADXL375_ACCEL_FULLSCALE * GRAVITY)))
+
void
ao_adxl375_init(void);
void
ao_adxl375_init(void);