aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaximilien Cuony <maximilien@theglu.org>2016-06-15 23:00:27 +0200
committerMaximilien Cuony <maximilien@theglu.org>2016-06-15 23:00:27 +0200
commitb7d00daa60971a94810868a12b358f35c29afc4a (patch)
tree4a3021f3986172d809aa97643e0ba0aca86cdf8f /src
parent8bfa7df80bdc1ad432861e6c7fb87f0f6efdbdc6 (diff)
downloadglutte-o-matic-b7d00daa60971a94810868a12b358f35c29afc4a.tar.gz
glutte-o-matic-b7d00daa60971a94810868a12b358f35c29afc4a.tar.bz2
glutte-o-matic-b7d00daa60971a94810868a12b358f35c29afc4a.zip
Update short beacon based on specs
Diffstat (limited to 'src')
-rw-r--r--src/common/src/Core/fsm.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/common/src/Core/fsm.c b/src/common/src/Core/fsm.c
index b86ebc8..a5b2d84 100644
--- a/src/common/src/Core/fsm.c
+++ b/src/common/src/Core/fsm.c
@@ -48,8 +48,6 @@ static char cw_message_balise[CW_MESSAGE_BALISE_LEN];
// Each 20 minutes, send a SHORT_BEACON
#define SHORT_BEACON_MAX (60 * 20)
-// Send a SHORT_BEACON only if a qso occured 2 hours ago
-#define SHORT_BEACON_QSO_AGO (60 * 60 * 2)
// Reset the counter if the QSO was 10m too long
#define SHORT_BEACON_RESET_IF_QSO (60 * 10)
@@ -57,9 +55,6 @@ static char cw_message_balise[CW_MESSAGE_BALISE_LEN];
static int short_beacon_counter_s = 0;
static uint64_t short_beacon_counter_last_update = 0;
-// The last timestamp when a qso occured
-static uint64_t last_qso_timestamp = 0;
-
// The last start of the last qso
static uint64_t last_qso_start_timestamp = 0;
@@ -162,7 +157,7 @@ void fsm_update() {
next_state = FSM_BALISE_LONGUE;
}
}
- else if (!fsm_in.qrp && short_beacon_counter_s == SHORT_BEACON_MAX && (last_qso_timestamp + 1000 * SHORT_BEACON_QSO_AGO) > timestamp_now()) {
+ else if (!fsm_in.qrp && short_beacon_counter_s == SHORT_BEACON_MAX) {
short_beacon_counter_s = 0;
next_state = FSM_BALISE_COURTE;
}
@@ -254,8 +249,6 @@ void fsm_update() {
last_qso_start_timestamp = timestamp_now();
}
- last_qso_timestamp = timestamp_now();
-
if (!fsm_in.sq) {
next_state = FSM_LETTRE;
}