From 70c9fc74a68fdb92569eb73295cfa154cf3768f4 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 18 Nov 2012 09:50:54 -0800 Subject: altos: Make Tm recovery mode set RF cal and callsign too This lets us connect to Tm even if someone messes up the RF calibration or callsign info Signed-off-by: Keith Packard --- src/core/ao_config.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/ao_config.c b/src/core/ao_config.c index e8ff95b7..e85ddcb4 100644 --- a/src/core/ao_config.c +++ b/src/core/ao_config.c @@ -144,8 +144,12 @@ _ao_config_get(void) } #if HAS_RADIO #if HAS_FORCE_FREQ - if (ao_force_freq) + if (ao_force_freq) { ao_config.frequency = 434550; + ao_config.radio_cal = ao_radio_cal; + ao_xmemcpy(&ao_config.callsign, CODE_TO_XDATA(AO_CONFIG_DEFAULT_CALLSIGN), + sizeof(AO_CONFIG_DEFAULT_CALLSIGN) - 1); + } #endif ao_config_set_radio(); #endif -- cgit v1.2.3 From 1df3e6402489480e30600304bf024481902f9425 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 18 Nov 2012 10:15:14 -0800 Subject: altos: Clean everything, even if we don't have compilers This ensures that stale bits aren't left if PATH isn't set right when 'make clean' is called. Signed-off-by: Keith Packard --- src/Makefile | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Makefile b/src/Makefile index 05075ae1..473cc60a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,8 +13,7 @@ vpath matrix.5c kalman include Version -ifneq ($(shell which sdcc),) - SUBDIRS+=\ +SDCCDIRS=\ telemetrum-v1.2 telemetrum-v1.1 telemetrum-v1.0 \ teledongle-v0.2 teledongle-v0.1 \ telemini-v1.0 telenano-v0.1 \ @@ -24,19 +23,30 @@ ifneq ($(shell which sdcc),) teleterra-v0.2 teleshield-v0.1 \ telefire-v0.1 \ spiradio-v0.1 + +AVRDIRS=\ + telescience-v0.1 telescience-pwm telepyro-v0.1 micropeak + +ARMDIRS=\ + megametrum-v0.1 megadongle-v0.1 stm-bringup stm-demo telelco-v0.1 + +ifneq ($(shell which sdcc),) + SUBDIRS += $(SDCCDIRS) endif ifneq ($(shell which avr-gcc),) - SUBDIRS += telescience-v0.1 telescience-pwm telepyro-v0.1 micropeak + SUBDIRS += $(AVRDIRS) endif ifneq ($(shell which arm-none-eabi-gcc),) - SUBDIRS += megametrum-v0.1 megadongle-v0.1 stm-bringup stm-demo telelco-v0.1 + SUBDIRS += $(ARMDIRS) endif +ALLDIRS=$(SDCCDIRS) $(AVRDIRS) $(ARMDIRS) + all: all-local all-recursive -RECURSIVE_TARGETS = all-recursive clean-recursive install-recursive +RECURSIVE_TARGETS = all-recursive install-recursive $(RECURSIVE_TARGETS): @target=`echo $@ | sed 's/-recursive//'`; \ @@ -45,6 +55,15 @@ $(RECURSIVE_TARGETS): (cd $$subdir && $(MAKE) $$target) || exit 1; \ done +ALL_RECURSIVE_TARGETS = clean-recursive + +$(ALL_RECURSIVE_TARGETS): + @target=`echo $@ | sed 's/-recursive//'`; \ + for subdir in $(ALLDIRS); do \ + echo "Making $$target in $$subdir"; \ + (cd $$subdir && $(MAKE) $$target) || exit 1; \ + done + distclean: clean clean: clean-local clean-recursive -- cgit v1.2.3 From 8ff0db3979405357003b52022e564a3da75ec3fb Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 18 Nov 2012 10:35:39 -0800 Subject: altos: micropeak LED is orange now, not blue Change the names around to match Signed-off-by: Keith Packard --- src/micropeak/ao_micropeak.c | 8 ++++---- src/micropeak/ao_pins.h | 7 ++++--- src/micropeak/ao_report_tiny.c | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/micropeak/ao_micropeak.c b/src/micropeak/ao_micropeak.c index bf656979..10e1d0f9 100644 --- a/src/micropeak/ao_micropeak.c +++ b/src/micropeak/ao_micropeak.c @@ -133,11 +133,11 @@ main(void) for (;;) { time += SAMPLE_SLEEP; if (sample_count == 0) - ao_led_on(AO_LED_BLUE); + ao_led_on(AO_LED_REPORT); ao_delay_until(time); ao_pa_get(); if (sample_count == 0) - ao_led_off(AO_LED_BLUE); + ao_led_off(AO_LED_REPORT); pa_avg = pa_avg - (pa_avg >> FILTER_SHIFT) + pa; pa_diff = pa_ground - pa_avg; @@ -172,10 +172,10 @@ main(void) time += SAMPLE_SLEEP; ao_delay_until(time); if ((sample_count & 3) == 0) - ao_led_on(AO_LED_BLUE); + ao_led_on(AO_LED_REPORT); ao_pa_get(); if ((sample_count & 3) == 0) - ao_led_off(AO_LED_BLUE); + ao_led_off(AO_LED_REPORT); #if HAS_EEPROM ao_log_micro_data(AO_LOG_MICRO_DATA | pa); #endif diff --git a/src/micropeak/ao_pins.h b/src/micropeak/ao_pins.h index 64f4444f..257b8694 100644 --- a/src/micropeak/ao_pins.h +++ b/src/micropeak/ao_pins.h @@ -19,10 +19,11 @@ #define _AO_PINS_H_ #include -#define AO_LED_BLUE (1<<4) +#define AO_LED_ORANGE (1<<4) #define AO_LED_SERIAL 4 -#define AO_LED_PANIC AO_LED_BLUE -#define LEDS_AVAILABLE (AO_LED_BLUE) +#define AO_LED_PANIC AO_LED_ORANGE +#define AO_LED_REPORT AO_LED_ORANGE +#define LEDS_AVAILABLE (AO_LED_ORANGE) #define USE_SERIAL_1_STDIN 0 #define HAS_USB 0 #define PACKET_HAS_SLAVE 0 diff --git a/src/micropeak/ao_report_tiny.c b/src/micropeak/ao_report_tiny.c index 5937508b..8b4960c6 100644 --- a/src/micropeak/ao_report_tiny.c +++ b/src/micropeak/ao_report_tiny.c @@ -17,7 +17,7 @@ #include -#define mid(time) ao_led_for(AO_LED_BLUE, time) +#define mid(time) ao_led_for(AO_LED_REPORT, time) #define pause(time) ao_delay(time) static void -- cgit v1.2.3 From 285fccfa82d89b0decc3b44f413eef9d0c8f1e63 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 18 Nov 2012 10:36:17 -0800 Subject: altos: Slow down micropeak report timing This makes reading the LED a lot easier. Signed-off-by: Keith Packard --- src/micropeak/ao_report_tiny.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/micropeak/ao_report_tiny.c b/src/micropeak/ao_report_tiny.c index 8b4960c6..109af1ed 100644 --- a/src/micropeak/ao_report_tiny.c +++ b/src/micropeak/ao_report_tiny.c @@ -25,14 +25,14 @@ ao_report_digit(uint8_t digit) __reentrant { if (!digit) { mid(AO_MS_TO_TICKS(600)); - pause(AO_MS_TO_TICKS(200)); + pause(AO_MS_TO_TICKS(300)); } else { while (digit--) { - mid(AO_MS_TO_TICKS(200)); - pause(AO_MS_TO_TICKS(200)); + mid(AO_MS_TO_TICKS(300)); + pause(AO_MS_TO_TICKS(300)); } } - pause(AO_MS_TO_TICKS(300)); + pause(AO_MS_TO_TICKS(600)); } void -- cgit v1.2.3