altos: Store altitude in 32-bits for MicroPeak
authorKeith Packard <keithp@keithp.com>
Sun, 9 Dec 2012 22:32:35 +0000 (14:32 -0800)
committerKeith 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

index 257b8694bc3c6301ecea048660dd3c1602e90df0..187b25442163a47fe0d63631ba3ed226bee125ca 100644 (file)
@@ -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)