From 23fbb836ca8f078b9e48b1e2ab60e365797092da Mon Sep 17 00:00:00 2001 From: df8oe Date: Fri, 16 Jun 2017 11:49:42 +0200 Subject: [PATCH 1/3] hopefully fixed broken APRS --- main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.c b/main.c index 34c1fe8..2b4d043 100644 --- a/main.c +++ b/main.c @@ -67,8 +67,12 @@ void USART1_IRQHandler(void) { void TIM2_IRQHandler(void) { if (TIM_GetITStatus(TIM2, TIM_IT_Update) != RESET) { TIM_ClearITPendingBit(TIM2, TIM_IT_Update); + + if (aprs_is_active()){ + aprs_timer_handler(); + } else { if (ALLOW_DISABLE_BY_BUTTON){ - if (ADCVal[1] > adc_bottom * 1.1){ + if (ADCVal[1] > adc_bottom){ button_pressed++; if (button_pressed > (5 * RTTY_SPEED)){ disable_armed = 1; @@ -82,13 +86,9 @@ void TIM2_IRQHandler(void) { button_pressed = 0; } if (button_pressed == 0) { - adc_bottom = ADCVal[1]; // dynamical reference for power down level + adc_bottom = ADCVal[1] * 1.1; // dynamical reference for power down level } } - - if (aprs_is_active()){ - aprs_timer_handler(); - } else { if (tx_on) { send_rtty_status = send_rtty((char *) rtty_buf); if (!disable_armed){ From f7fb34a91080322a36179c6f0077680fb843670e Mon Sep 17 00:00:00 2001 From: df8oe Date: Fri, 16 Jun 2017 13:58:54 +0200 Subject: [PATCH 2/3] Reduced time for power button to be pressed because of it is stable working using smaller time AND reaction to pressing now is much more acceptable. Long time test under different conditions will be done. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 2b4d043..a620cab 100644 --- a/main.c +++ b/main.c @@ -74,7 +74,7 @@ void TIM2_IRQHandler(void) { if (ALLOW_DISABLE_BY_BUTTON){ if (ADCVal[1] > adc_bottom){ button_pressed++; - if (button_pressed > (5 * RTTY_SPEED)){ + if (button_pressed > (RTTY_SPEED / 3)){ disable_armed = 1; GPIO_SetBits(GPIOB, RED); GPIO_SetBits(GPIOB, GREEN); From e930cd7fccbcf0b130351a44bb3235827144dbe2 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 16 Jun 2017 17:10:33 +0200 Subject: [PATCH 3/3] added pinout description for external connector --- docs/pinout_extension_port.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 docs/pinout_extension_port.txt diff --git a/docs/pinout_extension_port.txt b/docs/pinout_extension_port.txt new file mode 100644 index 0000000..11306bb --- /dev/null +++ b/docs/pinout_extension_port.txt @@ -0,0 +1,26 @@ +Created by DF8OE +---------------- + + + +view into port from outside + + +______________________| |______________________ +| | +| 1 2 3 4 5 | +| | +| 6 7 8 9 10 | +|_______________________________________________________| + + + 1 - SWDIO (PA13) + 2 - RST + 3 - MCU switched 3.3V out to external device + 4 - I2C2_SCL (PB10) + 5 - GND + 6 - GND + 7 - SWCLK (PA14) + 8 - +U_Battery + 9 - +VDD_MCU +10 - I2C2_SDA (PB11) \ No newline at end of file