diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2020-06-01 21:13:34 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2020-10-29 07:36:26 +0100 |
commit | ff498d10e1ae37dafd1b5abbb122e80d6d527c6b (patch) | |
tree | f34796c0948104167d3f5fe4beae88486c5e89fa /src/cnetz/dsp.c | |
parent | f468b2dd9fb88901be971a6be3572291be1d1a17 (diff) |
C-Netz: Added option to define time slots of OgK
Diffstat (limited to 'src/cnetz/dsp.c')
-rw-r--r-- | src/cnetz/dsp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cnetz/dsp.c b/src/cnetz/dsp.c index 9a07d4d..1c03b6d 100644 --- a/src/cnetz/dsp.c +++ b/src/cnetz/dsp.c @@ -677,11 +677,11 @@ again: if (cnetz->auto_polarity) cnetz->negative_polarity = (cnetz->sched_ts & 7) >> 2; /* send on timeslots depending on the polarity: - * positive polarity: 0, 8, 16, 24 - * negative polarity: 4, 12, 20, 28 + * positive polarity: ts, ts+8, ts+16, ts+24 + * negative polarity: ts+4, ts+12, ts+20, ts+28 */ - if (((cnetz->sched_ts & 7) == 0 && cnetz->negative_polarity == 0) - || ((cnetz->sched_ts & 7) == 4 && cnetz->negative_polarity == 1)) { + if (((cnetz->sched_ts & 7) == (si.timeslot & 7) && cnetz->negative_polarity == 0) + || ((cnetz->sched_ts & 7) == ((si.timeslot + 4) & 7) && cnetz->negative_polarity == 1)) { if (cnetz->sched_r_m == 0) { /* set last time slot, so we know to which time slot the message from mobile station belongs to */ cnetz->sched_last_ts = cnetz->sched_ts; |