diff options
-rw-r--r-- | doc/pio.txt | 2 | ||||
-rw-r--r-- | src/common/src/Core/fsm.c | 6 | ||||
-rw-r--r-- | src/common/src/Core/main.c | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/doc/pio.txt b/doc/pio.txt index 856111c..3332cc7 100644 --- a/doc/pio.txt +++ b/doc/pio.txt @@ -17,7 +17,7 @@ Connexions Relais - in REPLIE PC13 - out FAX PC14 - out GPS EPPS PC15 -- out SQ2 PC0 +- out SQ2 PC0 (ATTN: is also enabling 5V USB OTG, turns on LD7) - out DET 1750 PA8 - i/o Dallas 1-wire PA1 diff --git a/src/common/src/Core/fsm.c b/src/common/src/Core/fsm.c index 2aaca3e..35fd3bf 100644 --- a/src/common/src/Core/fsm.c +++ b/src/common/src/Core/fsm.c @@ -212,10 +212,12 @@ void fsm_update() { short_beacon_counter_s++; } - // SQ is debounced inside pio.c (300ms) + // SQ and button 1750 are debounced inside pio.c (300ms) fsm_out.require_tone_detector = fsm_in.sq; - if ((fsm_in.sq && fsm_in.det_1750) | (fsm_in.sq && sstv_state == SSTV_FSM_ON)) { + if ( (fsm_in.sq && fsm_in.det_1750) || + (fsm_in.sq && sstv_state == SSTV_FSM_ON) || + (fsm_in.button_1750)) { next_state = FSM_OPEN1; } else if (balise_state == BALISE_FSM_PENDING) { diff --git a/src/common/src/Core/main.c b/src/common/src/Core/main.c index 3f45f02..17c9ef1 100644 --- a/src/common/src/Core/main.c +++ b/src/common/src/Core/main.c @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2018 Matthias P. Braendli, Maximilien Cuony + * Copyright (c) 2019 Matthias P. Braendli, Maximilien Cuony * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -613,6 +613,8 @@ static void exercise_fsm(void __attribute__ ((unused))*pvParameters) } cw_last_trigger = fsm_out.cw_psk31_trigger; +#warning "Do the proper thing with SQ2" + pio_set_sq2((timestamp_now() % 4000) > 2000 ? 1 : 0); } } |