projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
285fccf
)
altos: Store altitude in 32-bits for MicroPeak
author
Keith Packard
<keithp@keithp.com>
Sun, 9 Dec 2012 22:32:35 +0000
(14:32 -0800)
committer
Keith Packard
<keithp@keithp.com>
Sun, 9 Dec 2012 22:32:35 +0000
(14:32 -0800)
Needs all 32 bits to store .1 meter resolution
Signed-off-by: Keith Packard <keithp@keithp.com>
src/micropeak/ao_pins.h
patch
|
blob
|
history
diff --git
a/src/micropeak/ao_pins.h
b/src/micropeak/ao_pins.h
index 257b8694bc3c6301ecea048660dd3c1602e90df0..187b25442163a47fe0d63631ba3ed226bee125ca 100644
(file)
--- a/
src/micropeak/ao_pins.h
+++ b/
src/micropeak/ao_pins.h
@@
-57,6
+57,7
@@
#define I2C_PIN_SDA PINB0
#define AO_CONST_ATTRIB PROGMEM
+typedef int32_t alt_t;
#define FETCH_ALT(o) ((alt_t) pgm_read_dword(&altitude_table[o]))
#define AO_ALT_VALUE(x) ((x) * 10)