diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-07-18 21:43:18 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-07-18 21:43:18 +0200 |
commit | 65fb2e5e20b47bf0ca9cdadbf4f2bd2bc47d2635 (patch) | |
tree | d5e861ac41a93189f044595a3f15b516b052bf3a /src/common | |
parent | 91ca5869590ddff5487dc37e72646878582a8a93 (diff) | |
download | glutte-o-matic-65fb2e5e20b47bf0ca9cdadbf4f2bd2bc47d2635.tar.gz glutte-o-matic-65fb2e5e20b47bf0ca9cdadbf4f2bd2bc47d2635.tar.bz2 glutte-o-matic-65fb2e5e20b47bf0ca9cdadbf4f2bd2bc47d2635.zip |
FSM: Remove TX_ON from OPEN1
This makes it impossible to get stuck with TX_ON if SQ never goes low.
Transition from BALISE_OPEN directly goes to OPEN2, regardless of SQ, making
a seamless switch from beacon-mode to repeater-mode for the users.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/src/Core/fsm.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/common/src/Core/fsm.c b/src/common/src/Core/fsm.c index 89db456..0fdedb8 100644 --- a/src/common/src/Core/fsm.c +++ b/src/common/src/Core/fsm.c @@ -207,8 +207,9 @@ void fsm_update() { break; case FSM_OPEN1: - fsm_out.tx_on = 1; - + /* Do not enable TX_ON here, otherwise we could get stuck transmitting + * forever if SQ never goes low. + */ if (!fsm_in.sq) { next_state = FSM_OPEN2; } @@ -507,11 +508,7 @@ void fsm_update() { } else { //FSM_BALISE_COURTE_OPEN if (fsm_in.cw_psk31_done) { - if (fsm_in.sq) { - next_state = FSM_OPEN1; - } else { - next_state = FSM_OPEN2; - } + next_state = FSM_OPEN2; } } |