From 4896582922ba5227da031c762221c8c7eafc2415 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 28 Apr 2017 00:01:18 -0700 Subject: altos/micropeak: Use existing ao_ms5607_current variable Instead of defining another. Signed-off-by: Keith Packard --- src/product/ao_micropeak.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/product') diff --git a/src/product/ao_micropeak.c b/src/product/ao_micropeak.c index f9960eb8..8aac79cd 100644 --- a/src/product/ao_micropeak.c +++ b/src/product/ao_micropeak.c @@ -22,7 +22,6 @@ #include #include -static struct ao_ms5607_sample sample; static struct ao_ms5607_value value; alt_t ground_alt, max_alt; @@ -31,8 +30,8 @@ alt_t ao_max_height; void ao_pa_get(void) { - ao_ms5607_sample(&sample); - ao_ms5607_convert(&sample, &value); + ao_ms5607_sample(&ao_ms5607_current); + ao_ms5607_convert(&ao_ms5607_current, &value); pa = value.pres; } -- cgit v1.2.3 From 7d4f7880b0934c208df65cea8b0f549f32f1c7d2 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 28 Apr 2017 00:02:02 -0700 Subject: altos/micropeak: Update ao_micropeak.h for MicroPeak v2 Allow different sample times, add constant for MicroPeak v2 log files. Signed-off-by: Keith Packard --- src/product/ao_micropeak.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/product') diff --git a/src/product/ao_micropeak.h b/src/product/ao_micropeak.h index 6dc7a465..240eed59 100644 --- a/src/product/ao_micropeak.h +++ b/src/product/ao_micropeak.h @@ -19,7 +19,9 @@ #ifndef _AO_MICROPEAK_H_ #define _AO_MICROPEAK_H_ +#ifndef SAMPLE_SLEEP #define SAMPLE_SLEEP AO_MS_TO_TICKS(96) +#endif /* 64 sample, or about six seconds worth */ #define GROUND_AVG_SHIFT 6 @@ -36,6 +38,7 @@ #define AO_LOG_ID_MICROPEAK 0 #define AO_LOG_ID_MICROKITE 1 +#define AO_LOG_ID_MICROPEAK2 2 #ifndef AO_LOG_ID #define AO_LOG_ID AO_LOG_ID_MICROPEAK -- cgit v1.2.3 From 3b4e3189211801c6f8f41c5d08c5a8551f28976c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 4 May 2017 22:06:16 -0700 Subject: altos: Move 'ao_force_freq' to ao_config.c Instead of having to add it to each product using this variable. Signed-off-by: Keith Packard --- src/kernel/ao_config.c | 4 ++++ src/product/ao_telemini.c | 2 -- src/telemini-v2.0/ao_telemini.c | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/product') diff --git a/src/kernel/ao_config.c b/src/kernel/ao_config.c index 5dda1c85..25634ffc 100644 --- a/src/kernel/ao_config.c +++ b/src/kernel/ao_config.c @@ -35,6 +35,10 @@ __pdata uint8_t ao_config_loaded; __pdata uint8_t ao_config_dirty; __xdata uint8_t ao_config_mutex; +#if HAS_FORCE_FREQ +__xdata uint8_t ao_force_freq; +#endif + #ifndef AO_CONFIG_DEFAULT_APRS_INTERVAL #define AO_CONFIG_DEFAULT_APRS_INTERVAL 0 #endif diff --git a/src/product/ao_telemini.c b/src/product/ao_telemini.c index b192763d..14414a48 100644 --- a/src/product/ao_telemini.c +++ b/src/product/ao_telemini.c @@ -19,8 +19,6 @@ #include "ao.h" #include "ao_pins.h" -__xdata uint8_t ao_force_freq; - void main(void) { diff --git a/src/telemini-v2.0/ao_telemini.c b/src/telemini-v2.0/ao_telemini.c index 68bc3dfe..a9ee423c 100644 --- a/src/telemini-v2.0/ao_telemini.c +++ b/src/telemini-v2.0/ao_telemini.c @@ -20,8 +20,6 @@ #include "ao_pins.h" #include -__xdata uint8_t ao_force_freq; - void main(void) { -- cgit v1.2.3