diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-12-28 20:53:22 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-12-28 20:53:22 +0100 |
commit | fadf883509eaa3350efabc906fb5a36635965097 (patch) | |
tree | f3753cf1de252773b346e3fcedc392d66799fee3 /src/fsm/fsm.c | |
parent | 651f4ec9bd58953bf9c94a4134d02235f85c12cf (diff) | |
download | glutte-o-matic-fadf883509eaa3350efabc906fb5a36635965097.tar.gz glutte-o-matic-fadf883509eaa3350efabc906fb5a36635965097.tar.bz2 glutte-o-matic-fadf883509eaa3350efabc906fb5a36635965097.zip |
Adapt CW freq and speed to recordings
Diffstat (limited to 'src/fsm/fsm.c')
-rw-r--r-- | src/fsm/fsm.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/fsm/fsm.c b/src/fsm/fsm.c index 8b7f105..88211d8 100644 --- a/src/fsm/fsm.c +++ b/src/fsm/fsm.c @@ -92,8 +92,8 @@ void fsm_update() { fsm_out.tx_on = 0; fsm_out.modulation = 0; fsm_out.cw_trigger = 0; - fsm_out.cw_speed = 23; - fsm_out.cw_frequency = 500; + fsm_out.cw_dit_duration = 50; + fsm_out.cw_frequency = 960; // other output signals keep their value switch (current_state) { @@ -135,6 +135,11 @@ void fsm_update() { fsm_out.tx_on = 1; fsm_out.modulation = 1; fsm_out.cw_msg = fsm_select_letter(); + if (fsm_out.cw_msg[0] == 'G') { + // The letter 'G' is a bit different + fsm_out.cw_frequency = 696; + fsm_out.cw_dit_duration = 70; + } fsm_out.cw_trigger = 1; if (fsm_in.cw_done) { @@ -217,6 +222,8 @@ void fsm_update() { case FSM_TEXTE_73: fsm_out.tx_on = 1; fsm_out.modulation = 1; + fsm_out.cw_frequency = 696; + fsm_out.cw_dit_duration = 70; fsm_out.cw_msg = "73"; fsm_out.cw_trigger = 1; @@ -231,6 +238,8 @@ void fsm_update() { case FSM_TEXTE_HB9G: fsm_out.tx_on = 1; fsm_out.modulation = 1; + fsm_out.cw_frequency = 696; + fsm_out.cw_dit_duration = 70; fsm_out.cw_msg = "HB9G"; fsm_out.cw_trigger = 1; @@ -246,6 +255,9 @@ void fsm_update() { fsm_out.tx_on = 1; fsm_out.modulation = 1; + fsm_out.cw_frequency = 696; + fsm_out.cw_dit_duration = 70; + if (random_bool()) { fsm_out.cw_msg = "HB9G 1628M"; } @@ -265,6 +277,9 @@ void fsm_update() { case FSM_BALISE_LONGUE: fsm_out.tx_on = 1; + fsm_out.cw_frequency = 588; + fsm_out.cw_dit_duration = 110; + // TODO transmit humidity // TODO read voltage if (fsm_in.wind_generator_ok) { @@ -289,6 +304,9 @@ void fsm_update() { case FSM_BALISE_SPECIALE: fsm_out.tx_on = 1; + fsm_out.cw_frequency = 696; + fsm_out.cw_dit_duration = 70; + // TODO read voltage if (fsm_in.wind_generator_ok) { fsm_out.cw_msg = "HB9G U 10V5 73"; @@ -309,6 +327,9 @@ void fsm_update() { case FSM_BALISE_COURTE: fsm_out.tx_on = 1; + fsm_out.cw_frequency = 696; + fsm_out.cw_dit_duration = 70; + { int rand = random_bool() * 2 + random_bool(); @@ -341,7 +362,6 @@ void fsm_update() { } - if (next_state != current_state) { timestamp_state[next_state] = timestamp_now(); } |