aboutsummaryrefslogtreecommitdiffstats
path: root/src/testapp1
diff options
context:
space:
mode:
Diffstat (limited to 'src/testapp1')
-rw-r--r--src/testapp1/README.md5
-rw-r--r--src/testapp1/main.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/src/testapp1/README.md b/src/testapp1/README.md
index 92c8206..c9216d9 100644
--- a/src/testapp1/README.md
+++ b/src/testapp1/README.md
@@ -20,7 +20,12 @@ When SYNCn input on PB2 goes to zero, transmission stops, and the internal time
Modes
-----
+Sync mode:
When internal time < 10 minutes, transmit only sign without "MO", in short timeslots, then stay silent 30s.
+Normal mode:
If internal time >= 10 minutes, transmit "MO<sign>" for a full minute timeslot.
+Permanent mode:
+At startup and before sync, all foxes start in permanent mode.
+
diff --git a/src/testapp1/main.c b/src/testapp1/main.c
index 117551a..fc165b4 100644
--- a/src/testapp1/main.c
+++ b/src/testapp1/main.c
@@ -123,6 +123,10 @@ int main(void)
const int permanent = (unique_letter == ':');
+ // In order to have all foxes transmitting all the time
+ // before sync
+ int sync_pending = 1;
+
delay_ms(12*DIT_DURATION);
morse("HB9HI");
delay_ms(12*DIT_DURATION);
@@ -130,9 +134,10 @@ int main(void)
while (1) {
if ((PINB & PORTB_SYNCn) == 0) {
reset_time = 1;
+ sync_pending = 0;
}
- if (permanent) {
+ if (permanent || sync_pending) {
morse(morse_string);
delay_ms(6*DIT_DURATION);
}