[hamradio-commits] [dump1090] 101/373: Fix Bug in Beast Mode Output

Matthew Ernisse mernisse-guest at moszumanska.debian.org
Thu Oct 23 14:58:09 UTC 2014


This is an automated email from the git hooks/post-receive script.

mernisse-guest pushed a commit to branch backport
in repository dump1090.

commit 11265089b464fb3724fec578de9ab4f39f60ab8d
Author: Malcolm Robb <Support at ATTAvionics.com>
Date:   Fri Apr 19 15:29:39 2013 +0100

    Fix Bug in Beast Mode Output
    
    Original code put the signal strength in before the timestamp. It should
    be after.
    
    Also add some code to support MODE A/C output at a future date.
---
 dump1090.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/dump1090.c b/dump1090.c
index 5506e77..20805b2 100644
--- a/dump1090.c
+++ b/dump1090.c
@@ -56,7 +56,7 @@
 // MinorVer changes when additional features are added, but not for bug fixes (range 00-99)
 // DayDate & Year changes for all changes, including for bug fixes. It represent the release date of the update
 //
-#define MODES_DUMP1090_VERSION     "1.01.1904.13"
+#define MODES_DUMP1090_VERSION     "1.01.1924.13"
 
 #define MODES_DEFAULT_RATE         2000000
 #define MODES_DEFAULT_FREQ         1090000000
@@ -70,6 +70,8 @@
 #define MODES_MSG_SQUELCH_LEVEL    0x02FF       /* Average signal strength limit */
 #define MODES_MSG_ENCODER_ERRS     3            /* Maximum number of encoding errors */
 
+#define MODEA_MSG_BYTES          2
+
 #define MODES_PREAMBLE_US        8              /* microseconds = bits */
 #define MODES_PREAMBLE_SAMPLES  (MODES_PREAMBLE_US       * 2)
 #define MODES_PREAMBLE_SIZE     (MODES_PREAMBLE_SAMPLES  * sizeof(uint16_t))
@@ -2226,16 +2228,18 @@ void modesSendBeastOutput(struct modesMessage *mm) {
       {*p++ = '2';}
     else if (msgLen == MODES_LONG_MSG_BYTES)
       {*p++ = '3';}
+    else if (msgLen == MODEA_MSG_BYTES)
+      {*p++ = '1';}
     else
       {return;}
 
-    *p++ = mm->signalLevel;
-
     pTimeStamp = (char *) &mm->timestampMsg;
     for (j = 5; j >= 0; j--) {
         *p++ = pTimeStamp[j];
     }
 
+    *p++ = mm->signalLevel;
+
     memcpy(p, mm->msg, msgLen);
 
     Modes.rawOutUsed += (msgLen + 9);

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