Skip to content

Commit 76f26c0

Browse files
authored
Merge pull request #76 from Digitelektro/feature/meteor_m2-3
Feature/meteor m2 3
2 parents 8fd8056 + 2b437eb commit 76f26c0

5 files changed

Lines changed: 15 additions & 8 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ if(UNIX AND NOT APPLE)
152152
SET(CPACK_GENERATOR "DEB")
153153
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
154154
SET(CPACK_PACKAGE_VERSION_MINOR "5")
155-
SET(CPACK_PACKAGE_VERSION_PATCH "3")
155+
SET(CPACK_PACKAGE_VERSION_PATCH "4")
156156
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Digitelektro")
157157
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/Digitelektro/MeteorDemod")
158158
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Russian Meteor M2 weather satellite data decoder")

common/settings.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,10 @@ bool Settings::differentialDecode() const {
301301
bool result = false;
302302

303303
if(mArgs.count("--diff")) {
304-
result = true;
304+
result = atoi(mArgs.at("--diff").c_str()) > 0;
305+
}
306+
if(mArgs.count("-diff")) {
307+
result = atoi(mArgs.at("-diff").c_str()) > 0;
305308
}
306309

307310
return result;
@@ -311,7 +314,10 @@ bool Settings::deInterleave() const {
311314
bool result = false;
312315

313316
if(mArgs.count("--int")) {
314-
result = true;
317+
result = atoi(mArgs.at("--int").c_str()) > 0;
318+
}
319+
if(mArgs.count("-int")) {
320+
result = atoi(mArgs.at("-int").c_str()) > 0;
315321
}
316322

317323
return result;
@@ -321,10 +327,10 @@ bool Settings::getBrokenModulation() const {
321327
bool result = false;
322328

323329
if(mArgs.count("-b")) {
324-
result = true;
330+
result = atoi(mArgs.at("-b").c_str()) > 0;
325331
}
326332
if(mArgs.count("--brokenM2")) {
327-
result = true;
333+
result = atoi(mArgs.at("--brokenM2").c_str()) > 0;
328334
}
329335

330336
return result;

common/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
#define VERSION_MAJOR 2
55
#define VERSION_MINOR 5
6-
#define VERSION_FIX 3
6+
#define VERSION_FIX 4
77

88
#endif // VERSION_H

decoder/correlation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ uint64_t Correlation::rotate64(uint64_t word, PhaseShift phaseShift) {
6767
case 6:
6868
word = swapIQ(word) ^ 0xFFFFFFFFFFFFFFFFU;
6969
break;
70-
case_7:
70+
case 7:
7171
word = swapIQ(word) ^ 0xAAAAAAAAAAAAAAAAU;
7272
break;
7373
default:

main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ int main(int argc, char* argv[]) {
5656

5757
mThreadPool.start();
5858

59+
MeteorDecoder meteorDecoder(mSettings.deInterleave(), mSettings.getDemodulatorMode() == "oqpsk", mSettings.differentialDecode());
60+
5961
size_t decodedPacketCounter = 0;
60-
MeteorDecoder meteorDecoder(mSettings.deInterleave(), mSettings.differentialDecode(), mSettings.getDemodulatorMode() == "oqpsk");
6162
std::string inputPath = mSettings.getInputFilePath();
6263
try {
6364
if(inputPath.substr(inputPath.find_last_of(".") + 1) == "wav") {

0 commit comments

Comments
 (0)