NMT: Fix channel encoding for interleaved

This commit is contained in:
Andreas Eversberg 2018-10-30 20:01:59 +01:00
parent e9a7f610ee
commit 9444fcdb91
1 changed files with 2 additions and 2 deletions

View File

@ -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)