kopia lustrzana https://github.com/Qyon/STM32_RTTY
hopefully fixed broken APRS
rodzic
29d7d97c71
commit
23fbb836ca
12
main.c
12
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){
|
||||
|
|
Ładowanie…
Reference in New Issue