From 65fb2e5e20b47bf0ca9cdadbf4f2bd2bc47d2635 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 18 Jul 2016 21:43:18 +0200 Subject: 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. --- src/common/src/Core/fsm.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src') 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; } } -- cgit v1.2.3