[hamradio-commits] [dump1090] 25/389: Set heading to 0 when speed is 0.

Matthew Ernisse mernisse-guest at moszumanska.debian.org
Wed Nov 5 00:19:36 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 539039f03772621f98c6b0ca7566fec6954efc88
Author: antirez <antirez at gmail.com>
Date:   Thu Jan 10 19:03:41 2013 +0100

    Set heading to 0 when speed is 0.
---
 dump1090.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dump1090.c b/dump1090.c
index e50edd7..14ce277 100644
--- a/dump1090.c
+++ b/dump1090.c
@@ -893,6 +893,8 @@ void decodeModesMessage(struct modesMessage *mm, unsigned char *msg) {
                     mm->heading = heading * 360 / (M_PI*2);
                     /* We don't want negative values but a 0-360 scale. */
                     if (mm->heading < 0) mm->heading += 360;
+                } else {
+                    mm->heading = 0;
                 }
             } else if (mm->mesub == 3 || mm->mesub == 4) {
                 mm->heading_is_valid = msg[5] & (1<<2);

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