diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 29 | ||||
-rw-r--r-- | src/core/ao_config.c | 6 | ||||
-rw-r--r-- | src/micropeak/ao_micropeak.c | 8 | ||||
-rw-r--r-- | src/micropeak/ao_pins.h | 7 | ||||
-rw-r--r-- | src/micropeak/ao_report_tiny.c | 10 |
5 files changed, 42 insertions, 18 deletions
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 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 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 <avr/pgmspace.h> -#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..109af1ed 100644 --- a/src/micropeak/ao_report_tiny.c +++ b/src/micropeak/ao_report_tiny.c @@ -17,7 +17,7 @@ #include <ao.h> -#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 @@ -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 |