aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-06-28 07:56:08 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-06-28 07:56:08 +0200
commitf19631d2a66d01c0cdd85134c5eb63a1da42b34a (patch)
treec01ddc8d73cebc912ea929ad56c1c127b4e64e5e /src
parent6e1f1165982c5342f30c8b52e0cbde401ab0dede (diff)
downloadglutte-o-matic-f19631d2a66d01c0cdd85134c5eb63a1da42b34a.tar.gz
glutte-o-matic-f19631d2a66d01c0cdd85134c5eb63a1da42b34a.tar.bz2
glutte-o-matic-f19631d2a66d01c0cdd85134c5eb63a1da42b34a.zip
Fix FSM deadlock in FSM_BALISE_COURTE_OPEN
When cw_psk31_done and sq occur simultaneously while inside FSM_BALISE_COURTE
Diffstat (limited to 'src')
-rw-r--r--src/common/src/Core/fsm.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/common/src/Core/fsm.c b/src/common/src/Core/fsm.c
index abe84b3..9fe2c4c 100644
--- a/src/common/src/Core/fsm.c
+++ b/src/common/src/Core/fsm.c
@@ -554,11 +554,16 @@ void fsm_update() {
fsm_out.cw_psk31_trigger = 1;
if (current_state == FSM_BALISE_COURTE) {
- if (fsm_in.sq) {
- next_state = FSM_BALISE_COURTE_OPEN;
+ if (fsm_in.cw_psk31_done) {
+ if (fsm_in.sq) {
+ next_state = FSM_OPEN2;
+ }
+ else {
+ next_state = FSM_OISIF;
+ }
}
- else if (fsm_in.cw_psk31_done) {
- next_state = FSM_OISIF;
+ else if (fsm_in.sq) {
+ next_state = FSM_BALISE_COURTE_OPEN;
}
}
else { //FSM_BALISE_COURTE_OPEN