Skip to content

Commit bda5d19

Browse files
authored
Merge pull request #93 from Digitelektro/develop
Develop
2 parents 7ed5b95 + c0003a1 commit bda5d19

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5)
33
include(ExternalProject)
44

55
project(meteordemod
6-
VERSION 2.6.0
6+
VERSION 2.6.1
77
LANGUAGES CXX
88
)
99

decoder/protocol/lrpt/decoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void Decoder::process(const uint8_t* cadu) {
3333
// Current frame doesn't have header
3434
mCcsdsPayload.insert(mCcsdsPayload.end(), cadu, cadu + cPDUDataSize);
3535
} else {
36-
mCcsdsPayload.insert(mCcsdsPayload.end(), cadu, cadu + firstHeaderPointer + 1);
36+
mCcsdsPayload.insert(mCcsdsPayload.end(), cadu, cadu + firstHeaderPointer);
3737
parsePartial(mCcsdsPayload.data(), mCcsdsPayload.size());
3838
mCcsdsPayload.clear();
3939
}

decoder/protocol/lrpt/msumr/bitio.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#include "bitio.h"
22

3-
#include <iostream>
4-
53
namespace decoder {
64
namespace protocol {
75
namespace lrpt {
@@ -14,13 +12,14 @@ BitIOConst::BitIOConst(const uint8_t* bytes, uint32_t size)
1412

1513
uint32_t BitIOConst::peekBits(int n) {
1614
uint32_t result = 0;
15+
int bit = 0;
1716
for(int i = 0; i < n; i++) {
1817
int p = mPos + i;
19-
if((p >> 3) >= mSize) {
20-
break;
18+
if((p >> 3) < mSize) {
19+
bit = (mpBytes[p >> 3] >> (7 - (p & 7))) & 1;
20+
} else {
21+
bit = 0;
2122
}
22-
// std::cout << "pos=" << (p >> 3) << ", Size=" << mSize << std::endl;
23-
int bit = (mpBytes[p >> 3] >> (7 - (p & 7))) & 1;
2423
result = (result << 1) | bit;
2524
}
2625
return result;

decoder/viterbi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void Viterbi::calculateBer(const uint8_t* original, const uint8_t* reEncoded, ss
4444
}
4545
}
4646

47-
if(errors == 0) {
47+
if(total == 0) {
4848
mLastBER = 0.0f;
4949
} else {
5050
mLastBER = (errors / total);

0 commit comments

Comments
 (0)