From: Bdale Garbee Date: Thu, 2 Feb 2023 19:54:42 +0000 (-0700) Subject: Merge branch 'branch-1.9' into debian X-Git-Tag: debian/1.9.14-1~1 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=a42ac3c87ac8021829a7040bfbb3e44f52bcbef8;hp=157addd2cfcc305721f82cbb918282b6e3edf50d;p=fw%2Faltos Merge branch 'branch-1.9' into debian --- diff --git a/ChangeLog b/ChangeLog index 34bfa441..9ca13c74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,77 @@ +commit 0d34cacb37ad37208bd0602364a0be660ddd12bc +Merge: e6a83e73 360aa73c +Author: Bdale Garbee +Date: Thu Feb 2 12:52:01 2023 -0700 + + Merge branch 'master' into branch-1.9 + +commit 360aa73cef6fd7b782c3559aa26b3e501ee72d70 +Author: Keith Packard +Date: Thu Feb 2 11:33:35 2023 -0800 + + Version 1.9.14 + + Signed-off-by: Keith Packard + +commit eb66d5f1121cbc7680a61539d97973482c4dae25 +Author: Keith Packard +Date: Thu Feb 2 11:33:00 2023 -0800 + + doc: Release notes for 1.9.14 + + Signed-off-by: Keith Packard + +commit 015ebe291695d0588294a523b864aed73a5178c9 +Author: Keith Packard +Date: Wed Feb 1 18:00:24 2023 -0800 + + altos/drivers: Increase LCO receive timeout to 20ms + + Changes in the cc1200 driver appear to have sped up the transition + from TX to RX enough that we now need to wait a bit longer for + TeleFire to return a packet. Increase the 38400 bps timeout to 20ms + and the 9600 bps timeout to 30ms. + + Signed-off-by: Keith Packard + +commit fe99a50a7c1b4834193bbb73fbfd1b0e49b7ff45 +Author: Keith Packard +Date: Wed Feb 1 17:59:28 2023 -0800 + + altos/drivers: Use spi duplex to fetch register values + + We read register values during regular operation, so let's improve + performance a bit by making this faster. + + Signed-off-by: Keith Packard + +commit a2d18d43722355e834288b0b4c83b021218f15cb +Author: Keith Packard +Date: Wed Feb 1 16:29:42 2023 -0800 + + altos/telefiretwo-v0.2: Get things building again + + This code got very stale and needed some config updates + + Signed-off-by: Keith Packard + +commit 05aacbd4a37d8bbe5b89664fc3630ffc4096ec69 +Author: Keith Packard +Date: Wed Feb 1 14:14:55 2023 -0800 + + drivers/cc1200: Don't disable cc1200 interrupts ever + + The driver now leaves interrupts always enabled, don't disable them in + ao_radio_recv_abort as nothing will ever turn them back on. + + Signed-off-by: Keith Packard + +commit e6a83e73b4b2c56b14853f1e717aeaa9f874728d +Author: Bdale Garbee +Date: Thu Jan 19 22:57:39 2023 -0700 + + releasing 1.9.13 + commit 8e42773e7834638464b46495123dbdc2356032bf Merge: a6c32739 7fe1408a Author: Bdale Garbee diff --git a/configure.ac b/configure.ac index b41b5398..2712e878 100644 --- a/configure.ac +++ b/configure.ac @@ -18,13 +18,13 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) -AC_INIT([altos], 1.9.13) +AC_INIT([altos], 1.9.14) ANDROID_VERSION=36 AC_CONFIG_SRCDIR([src/kernel/ao.h]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE -RELEASE_DATE=2023-01-19 +RELEASE_DATE=2023-02-02 AC_SUBST(RELEASE_DATE) DOC_DATE=`LC_ALL=C date -d $RELEASE_DATE +'%d %b %Y'` diff --git a/doc/Makefile.am b/doc/Makefile.am index d9e5f188..575f1fe0 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -17,6 +17,7 @@ FAKETIME=TZ=UTC faketime -f '$(RELEASE_DATE) 00:00:00 i0' endif RELNOTES_INC=\ + release-notes-1.9.14.inc \ release-notes-1.9.13.inc \ release-notes-1.9.12.inc \ release-notes-1.9.11.inc \ diff --git a/doc/easymini-release-notes.inc b/doc/easymini-release-notes.inc index 1d47abdb..924ca592 100644 --- a/doc/easymini-release-notes.inc +++ b/doc/easymini-release-notes.inc @@ -1,5 +1,9 @@ [appendix] == Release Notes + :leveloffset: 2 + include::release-notes-1.9.14.adoc[] + + <<<< :leveloffset: 2 include::release-notes-1.9.13.adoc[] diff --git a/doc/release-notes-1.9.14.inc b/doc/release-notes-1.9.14.inc new file mode 100644 index 00000000..0292b018 --- /dev/null +++ b/doc/release-notes-1.9.14.inc @@ -0,0 +1,10 @@ += Release Notes for Version 1.9.14 +include::release-head.adoc[] +:doctype: article + + Version 1.9.14 + + == AltOS + + * Fix 1.9.13 regression in TeleLCO startup sequence that + detects available TeleFire units. diff --git a/doc/release-notes.inc b/doc/release-notes.inc index b1e3d8ad..576ae466 100644 --- a/doc/release-notes.inc +++ b/doc/release-notes.inc @@ -1,5 +1,9 @@ [appendix] == Release Notes + :leveloffset: 2 + include::release-notes-1.9.14.adoc[] + + <<<< :leveloffset: 2 include::release-notes-1.9.13.adoc[] diff --git a/doc/telegps-release-notes.inc b/doc/telegps-release-notes.inc index 94bead62..304959ba 100644 --- a/doc/telegps-release-notes.inc +++ b/doc/telegps-release-notes.inc @@ -1,5 +1,9 @@ [appendix] == Release Notes + :leveloffset: 2 + include::release-notes-1.9.14.adoc[] + + <<<< :leveloffset: 2 include::release-notes-1.9.13.adoc[] diff --git a/src/drivers/ao_cc1200.c b/src/drivers/ao_cc1200.c index 72709744..b295d054 100644 --- a/src/drivers/ao_cc1200.c +++ b/src/drivers/ao_cc1200.c @@ -65,7 +65,7 @@ extern const uint32_t ao_radio_cal; static uint8_t ao_radio_reg_read(uint16_t addr) { - uint8_t data[2]; + uint8_t data[3]; uint8_t d; #if CC1200_TRACE @@ -84,13 +84,12 @@ ao_radio_reg_read(uint16_t addr) d = 1; } ao_radio_select(); - ao_radio_spi_send(data, d); - ao_radio_spi_recv(data, 1); + ao_radio_duplex(data, data, d + 1); ao_radio_deselect(); #if CC1200_TRACE - printf (" %02x\n", data[0]); + printf (" %02x\n", data[d]); #endif - return data[0]; + return data[d]; } static void @@ -204,7 +203,6 @@ ao_radio_status(void) void ao_radio_recv_abort(void) { - ao_exti_disable(AO_CC1200_INT_PORT, AO_CC1200_INT_PIN); ao_radio_abort = 1; ao_wakeup(&ao_radio_wake); } diff --git a/src/drivers/ao_lco_func.c b/src/drivers/ao_lco_func.c index 5aacd0e4..f5e27e60 100644 --- a/src/drivers/ao_lco_func.c +++ b/src/drivers/ao_lco_func.c @@ -29,7 +29,7 @@ ao_lco_query(uint16_t box, struct ao_pad_query *query, uint16_t *tick_offset) { int8_t r; AO_TICK_TYPE sent_time; - AO_TICK_TYPE timeout = AO_MS_TO_TICKS(10); + AO_TICK_TYPE timeout = AO_MS_TO_TICKS(20); #if HAS_RADIO_RATE switch (ao_config.radio_rate) { @@ -37,7 +37,7 @@ ao_lco_query(uint16_t box, struct ao_pad_query *query, uint16_t *tick_offset) default: break; case AO_RADIO_RATE_9600: - timeout = AO_MS_TO_TICKS(20); + timeout = AO_MS_TO_TICKS(30); break; case AO_RADIO_RATE_2400: timeout = AO_MS_TO_TICKS(80); diff --git a/src/telefiretwo-v0.2/Makefile b/src/telefiretwo-v0.2/Makefile index d48dcc37..5b61e756 100644 --- a/src/telefiretwo-v0.2/Makefile +++ b/src/telefiretwo-v0.2/Makefile @@ -33,7 +33,7 @@ ALTOS_SRC = \ ao_data.c \ ao_config.c \ ao_task.c \ - ao_led_stm.c \ + ao_led.c \ ao_stdio.c \ ao_panic.c \ ao_timer.c \ @@ -71,13 +71,10 @@ OBJ=$(SRC:.c=.o) all: $(PROG) $(HEX) $(PROG): Makefile $(OBJ) altos.ld - $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS) + $(call quiet,CC) $(LDFLAGS) -o $(PROG) $(OBJ) $(LIBS) $(OBJ): $(INC) -ao_product.h: ao-make-product.5c ../Version - $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@ - distclean: clean clean: diff --git a/src/telefiretwo-v0.2/ao_pins.h b/src/telefiretwo-v0.2/ao_pins.h index e04c4fd7..2fe5045b 100644 --- a/src/telefiretwo-v0.2/ao_pins.h +++ b/src/telefiretwo-v0.2/ao_pins.h @@ -26,8 +26,10 @@ #define HAS_FLIGHT 0 #define HAS_USB 1 #define HAS_BEEP 1 -#define BEEPER_CHANNEL 4 +#define BEEPER_PORT (&stm_gpiob) +#define BEEPER_PIN 1 #define BEEPER_TIMER 3 +#define BEEPER_CHANNEL 4 #define HAS_GPS 0 #define HAS_SERIAL_1 0 #define HAS_ADC 1 @@ -118,33 +120,33 @@ #define AO_CC1200_INT_GPIO 2 #define AO_CC1200_INT_GPIO_IOCFG CC1200_IOCFG2 -#define LED_PORT_0 (&stm_gpioa) -#define LED_PORT_1 (&stm_gpiob) - -#define LED_PORT_0_ENABLE STM_RCC_AHBENR_GPIOAEN -#define LED_PORT_1_ENABLE STM_RCC_AHBENR_GPIOBEN +#define HAS_LED 1 /* Port A, pins 4-6 */ -#define LED_PORT_0_SHIFT 4 -#define LED_PORT_0_MASK 0x7 -#define LED_PIN_GREEN 0 -#define LED_PIN_AMBER 1 -#define LED_PIN_RED 2 -#define AO_LED_RED (1 << LED_PIN_RED) -#define AO_LED_AMBER (1 << LED_PIN_AMBER) -#define AO_LED_GREEN (1 << LED_PIN_GREEN) +#define LED_0_PORT (&stm_gpioa) +#define LED_0_PIN 4 +#define LED_1_PORT (&stm_gpioa) +#define LED_1_PIN 5 +#define LED_2_PORT (&stm_gpioa) +#define LED_2_PIN 6 + +#define AO_LED_GREEN AO_LED_0 +#define AO_LED_AMBER AO_LED_1 +#define AO_LED_RED AO_LED_2 /* Port B, pins 4-5 */ +#define LED_3_PORT (&stm_gpiob) +#define LED_3_PIN 4 +#define LED_4_PORT (&stm_gpiob) +#define LED_4_PIN 5 #define LED_PORT_1_SHIFT 0 #define LED_PORT_1_MASK (0x3 << 4) #define LED_PIN_CONT_0 4 #define LED_PIN_ARMED 5 -#define AO_LED_ARMED (1 << LED_PIN_ARMED) -#define AO_LED_CONTINUITY(c) (1 << (4 - (c))) -#define AO_LED_CONTINUITY_MASK (0x1 << 4) - -#define LEDS_AVAILABLE (LED_PORT_0_MASK|LED_PORT_1_MASK) +#define AO_LED_ARMED AO_LED_3 +#define AO_LED_CONTINUITY(c) AO_LED_4 +#define AO_LED_CONTINUITY_MASK AO_LED_4 /* Alarm A */ #define AO_SIREN @@ -183,8 +185,13 @@ #define AO_ADC_SQ2 AO_PAD_ADC_PYRO #define AO_ADC_SQ3 AO_PAD_ADC_BATT -#define AO_PYRO_R_PYRO_SENSE 200 -#define AO_PYRO_R_SENSE_GND 22 +#define AO_PAD_R_V_BATT_BATT_SENSE 200 +#define AO_PAD_R_BATT_SENSE_GND 22 +#define AO_PAD_R_V_PYRO_PYRO_SENSE 200 +#define AO_PAD_R_PYRO_SENSE_GND 22 + +#define AO_PAD_R_IGNITER_IGNITER_SENSE 200 +#define AO_PAD_R_IGNITER_SENSE_GND 22 #define AO_FIRE_R_POWER_FET 0 #define AO_FIRE_R_FET_SENSE 200 @@ -192,6 +199,8 @@ #define HAS_ADC_TEMP 0 +#define AO_ADC_REFERENCE_DV 33 + struct ao_adc { int16_t sense[AO_PAD_NUM]; int16_t pyro; @@ -199,7 +208,7 @@ struct ao_adc { }; #define AO_ADC_DUMP(p) \ - printf ("tick: %5u 0: %5d pyro: %5d batt %5d\n", \ + printf ("tick: %5lu 0: %5d pyro: %5d batt %5d\n", \ (p)->tick, \ (p)->adc.sense[0], \ (p)->adc.pyro, \ diff --git a/src/telefiretwo-v0.2/ao_telefiretwo.c b/src/telefiretwo-v0.2/ao_telefiretwo.c index bdcf3213..bcfe5b3b 100644 --- a/src/telefiretwo-v0.2/ao_telefiretwo.c +++ b/src/telefiretwo-v0.2/ao_telefiretwo.c @@ -20,13 +20,14 @@ #include #include #include +#include -void +int main(void) { ao_clock_init(); - ao_led_init(LEDS_AVAILABLE); + ao_led_init(); ao_task_init(); @@ -52,4 +53,5 @@ main(void) // ao_radio_cmac_cmd_init(); ao_start_scheduler(); + return 0; }