diff options
| author | Keith Packard <keithp@keithp.com> | 2012-12-09 18:33:31 -0800 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-12-09 18:33:31 -0800 |
| commit | b26e837a6f18641aae9372aab22168849ff10812 (patch) | |
| tree | c8562489c7aaec44e32f67613c0480c56f9320a9 /src/micropeak | |
| parent | 1489c7f75f7b9ce547ac49c157b440c4f9131ef4 (diff) | |
| parent | c233ef67f42c14cb1d0e0542a9523b279f826af5 (diff) | |
Merge branch 'micropeak-1.1'
Diffstat (limited to 'src/micropeak')
| -rw-r--r-- | src/micropeak/ao_pins.h | 3 | ||||
| -rw-r--r-- | src/micropeak/ao_report_tiny.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/micropeak/ao_pins.h b/src/micropeak/ao_pins.h index 257b8694..63e9cb1b 100644 --- a/src/micropeak/ao_pins.h +++ b/src/micropeak/ao_pins.h @@ -57,8 +57,9 @@ #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) +#define AO_ALT_VALUE(x) ((x) * (alt_t) 10) #endif /* _AO_PINS_H_ */ diff --git a/src/micropeak/ao_report_tiny.c b/src/micropeak/ao_report_tiny.c index 109af1ed..bdcc131e 100644 --- a/src/micropeak/ao_report_tiny.c +++ b/src/micropeak/ao_report_tiny.c @@ -38,8 +38,8 @@ ao_report_digit(uint8_t digit) __reentrant void ao_report_altitude(void) { - __pdata int16_t agl = ao_max_height; - __xdata uint8_t digits[10]; + __pdata alt_t agl = ao_max_height; + static __xdata uint8_t digits[11]; __pdata uint8_t ndigits, i; if (agl < 0) |
