aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorMaximilien Cuony <maximilien@theglu.org>2016-06-14 22:52:34 +0200
committerMaximilien Cuony <maximilien@theglu.org>2016-06-14 22:52:34 +0200
commitbb6e6cd5ae944961da2c32710da1315c7f3271ec (patch)
tree5caa549e30b864336cece31c4fa400657e03f25f /src/common
parent9334c11d1137c3e56f2ff9a8e842e96083dadc32 (diff)
downloadglutte-o-matic-bb6e6cd5ae944961da2c32710da1315c7f3271ec.tar.gz
glutte-o-matic-bb6e6cd5ae944961da2c32710da1315c7f3271ec.tar.bz2
glutte-o-matic-bb6e6cd5ae944961da2c32710da1315c7f3271ec.zip
Clear the ack flag if start_tm is 0
Diffstat (limited to 'src/common')
-rw-r--r--src/common/src/Core/fsm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/src/Core/fsm.c b/src/common/src/Core/fsm.c
index 9f5e185..374f3e0 100644
--- a/src/common/src/Core/fsm.c
+++ b/src/common/src/Core/fsm.c
@@ -106,8 +106,14 @@ void fsm_update() {
fsm_out.msg_frequency = 960;
// other output signals keep their value
+ // Clear the ack flag if the start_tm has been cleared
+ if (!fsm_in.start_tm && fsm_out.ack_start_tm) {
+ fsm_out.ack_start_tm = 0;
+ }
+
switch (current_state) {
case FSM_OISIF:
+
if (fsm_in.tone_1750 && fsm_in.sq) {
next_state = FSM_OPEN1;
}
@@ -460,5 +466,3 @@ void fsm_get_outputs(struct fsm_output_signals_t* out)
{
*out = fsm_out;
}
-
-