aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2018-10-30 20:01:59 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2018-10-30 20:01:59 +0100
commit9444fcdb91ec8234385fcf6b47631e45ecb66ff5 (patch)
treeb5521e3e94e47413b05678a92582d257d198d9c9 /src
parente9a7f610eefbc886518cd88284eeecb1ebf8f10c (diff)
NMT: Fix channel encoding for interleaved
Diffstat (limited to 'src')
-rw-r--r--src/nmt/frame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nmt/frame.c b/src/nmt/frame.c
index 3f9b8c6..5e3f6f4 100644
--- a/src/nmt/frame.c
+++ b/src/nmt/frame.c
@@ -46,8 +46,8 @@ uint64_t nmt_encode_channel(int nmt_system, int channel, int power)
value |= power << 9;
} else {
/* interleaved channels are indicated in traffic area */
- if (value >= 1024)
- value -= 1024;
+ if (channel >= 1024)
+ channel -= 1024;
value |= channel;
/* if channel >= 512, set upper bit */
if (value & 0x200)