diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-06-02 08:58:22 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-06-02 08:58:22 +0200 |
commit | bc17aafaa2d6c65b75674538b9d9baa4520edd54 (patch) | |
tree | 16d74e695449c9ff2cc699b050817e79ca1cdeba /src/testapp1 | |
parent | 6bc1091c102cbb1c6839d46dda50bd2aa1a3433b (diff) | |
download | renard_hb9hi-bc17aafaa2d6c65b75674538b9d9baa4520edd54.tar.gz renard_hb9hi-bc17aafaa2d6c65b75674538b9d9baa4520edd54.tar.bz2 renard_hb9hi-bc17aafaa2d6c65b75674538b9d9baa4520edd54.zip |
Set permanent mode for all foxes before sync
Diffstat (limited to 'src/testapp1')
-rw-r--r-- | src/testapp1/README.md | 5 | ||||
-rw-r--r-- | src/testapp1/main.c | 7 |
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); } |