aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-05-03 21:48:05 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-05-03 21:48:05 +0200
commitbafb6e10eb538446a13645b3e29aff93ba5e030d (patch)
treec7920f5e1c6f4e156ad31bbc7453b4b6d1fcfbc4 /src
parent8ed337985b1ff75d2118c0591684ca878a40a81b (diff)
downloadglutte-o-matic-bafb6e10eb538446a13645b3e29aff93ba5e030d.tar.gz
glutte-o-matic-bafb6e10eb538446a13645b3e29aff93ba5e030d.tar.bz2
glutte-o-matic-bafb6e10eb538446a13645b3e29aff93ba5e030d.zip
Handle 1750 front button
Diffstat (limited to 'src')
-rw-r--r--src/common/src/Core/fsm.c6
-rw-r--r--src/common/src/Core/main.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/common/src/Core/fsm.c b/src/common/src/Core/fsm.c
index 2aaca3e..35fd3bf 100644
--- a/src/common/src/Core/fsm.c
+++ b/src/common/src/Core/fsm.c
@@ -212,10 +212,12 @@ void fsm_update() {
short_beacon_counter_s++;
}
- // SQ is debounced inside pio.c (300ms)
+ // SQ and button 1750 are debounced inside pio.c (300ms)
fsm_out.require_tone_detector = fsm_in.sq;
- if ((fsm_in.sq && fsm_in.det_1750) | (fsm_in.sq && sstv_state == SSTV_FSM_ON)) {
+ if ( (fsm_in.sq && fsm_in.det_1750) ||
+ (fsm_in.sq && sstv_state == SSTV_FSM_ON) ||
+ (fsm_in.button_1750)) {
next_state = FSM_OPEN1;
}
else if (balise_state == BALISE_FSM_PENDING) {
diff --git a/src/common/src/Core/main.c b/src/common/src/Core/main.c
index 3f45f02..17c9ef1 100644
--- a/src/common/src/Core/main.c
+++ b/src/common/src/Core/main.c
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
- * Copyright (c) 2018 Matthias P. Braendli, Maximilien Cuony
+ * Copyright (c) 2019 Matthias P. Braendli, Maximilien Cuony
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -613,6 +613,8 @@ static void exercise_fsm(void __attribute__ ((unused))*pvParameters)
}
cw_last_trigger = fsm_out.cw_psk31_trigger;
+#warning "Do the proper thing with SQ2"
+ pio_set_sq2((timestamp_now() % 4000) > 2000 ? 1 : 0);
}
}