diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2013-12-11 20:11:16 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-12-12 11:09:17 +0100 |
commit | 5e94cd4fdedc44ba178a9d3d150f0d5ba7abc742 (patch) | |
tree | 385a97840141752d9445ebea55930966972fa9c1 /src/decoding.cpp | |
parent | cc5a4cbe9ba583189c0d007215f51f7986b4e261 (diff) |
decoding: Cosmetic - change rbb decoding
Diffstat (limited to 'src/decoding.cpp')
-rw-r--r-- | src/decoding.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/decoding.cpp b/src/decoding.cpp index 47c8a84..fce8124 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -85,13 +85,15 @@ uint8_t Decoding::get_ms_class_by_capability(MS_Radio_Access_capability_t *cap) /** * show_rbb needs to be an array with 65 elements + * The index of the array is the bit position in the rbb + * (show_rbb[63] relates to BSN ssn-1) */ void Decoding::extract_rbb(const uint8_t *rbb, char *show_rbb) { - for (int i = 63; i >= 0; i--) { + for (int i = 0; i < 64; i++) { uint8_t bit; - bit = (rbb[i >> 3] >> (7 - (i&7))) & 1; + bit = !!(rbb[i/8] & (1<<(7-i%8))); show_rbb[i] = bit ? 'R' : 'I'; } |