diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-06-19 09:03:54 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-06-19 09:03:54 +0200 |
commit | 36fd7c3fa8847af0f26e7b6aca9658c473fe7bde (patch) | |
tree | a83a7361cc68b29b224890bf2c0a1a2e604d869c | |
parent | d086c820aaed6199aeaa026f0ce07db6e2ba5694 (diff) | |
download | renard_hb9hi-master.tar.gz renard_hb9hi-master.tar.bz2 renard_hb9hi-master.zip |
-rw-r--r-- | src/testapp1/README.md | 4 | ||||
-rw-r--r-- | src/testapp1/main.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/testapp1/README.md b/src/testapp1/README.md index c9216d9..5d79f20 100644 --- a/src/testapp1/README.md +++ b/src/testapp1/README.md @@ -21,10 +21,10 @@ Modes ----- Sync mode: -When internal time < 10 minutes, transmit only sign without "MO", in short timeslots, then stay silent 30s. +When internal time < 25 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. +If internal time >= 25 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 c5d3102..4afbbca 100644 --- a/src/testapp1/main.c +++ b/src/testapp1/main.c @@ -11,8 +11,8 @@ #define PORTB_SYNCn (1 << 2) #define PORTB_LED (1 << 4) -/* Specify ID here */ -static const uint8_t renard_id = 0; +/* Specify ID here, zero-indexed (E=0, I=1, ...) */ +static const uint8_t renard_id = 4; static const uint8_t num_renards_cycle = 4; // colon (:) represents ERROR @@ -110,7 +110,7 @@ int main(void) morse(morse_string); delay_ms(6*DIT_DURATION); } - else if (minute >= 1 /* TODO */ ) { // see README.md + else if (minute >= 25) { // see README.md /* renard id 0: start at (k * num_renards_cycle) * 60, end at (k * num_renards_cycle) * 60 + 55 */ const int in_timeslot = (minute % (uint32_t)num_renards_cycle) == renard_id; @@ -124,7 +124,7 @@ int main(void) } else { /* renard id 0: start every 30s, with an additional 2s offset depending on renard_id */ - const uint32_t second_offset = second % 10uL; // TODO + const uint32_t second_offset = second % 30uL; if (second_offset == 2 * renard_id) { morse_char(unique_letter); |