[hamradio-commits] [dump1090] 286/389: Fixed: now skipping correct number of values in magnitude buffer
Matthew Ernisse
mernisse-guest at moszumanska.debian.org
Wed Nov 5 00:20:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
mernisse-guest pushed a commit to branch master
in repository dump1090.
commit 00533e7ff488e8458768cc357695a138273fb15d
Author: Markus Gräb <m_graeb11 at cs.uni-kl.de>
Date: Wed May 14 19:36:36 2014 +0200
Fixed: now skipping correct number of values in magnitude buffer
Variable j points to the current location in the magnitude vector.
When decoding a message (MODES_PREAMBLE_US+msglen)*2 is added to j.
In the loop head j is increased by 1, so one value was skipped.
---
mode_s.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mode_s.c b/mode_s.c
index e5e9c81..780e650 100644
--- a/mode_s.c
+++ b/mode_s.c
@@ -1774,7 +1774,7 @@ void detectModeS(uint16_t *m, uint32_t mlen) {
// Skip this message if we are sure it's fine
if (mm.crcok) {
- j += (MODES_PREAMBLE_US+msglen)*2;
+ j += (MODES_PREAMBLE_US+msglen)*2 - 1;
}
// Pass data to the next layer
@@ -2092,4 +2092,4 @@ int decodeCPRrelative(struct aircraft *a, int fflag, int surface) {
}
//
// ===================== Mode S detection and decoding ===================
-//
\ No newline at end of file
+//
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090.git
More information about the pkg-hamradio-commits
mailing list