Merge pull request #7 from df8oe/master

hopefully fixed broken APRS
master
Qyon 2017-06-19 18:27:48 +02:00 zatwierdzone przez GitHub
commit bf4172669f
2 zmienionych plików z 33 dodań i 7 usunięć

Wyświetl plik

@ -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)

14
main.c
Wyświetl plik

@ -67,10 +67,14 @@ 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)){
if (button_pressed > (RTTY_SPEED / 3)){
disable_armed = 1;
GPIO_SetBits(GPIOB, RED);
GPIO_SetBits(GPIOB, GREEN);
@ -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){