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.
This commit is contained in:
parent
e98728108c
commit
11265089b4
10
dump1090.c
10
dump1090.c
|
@ -56,7 +56,7 @@
|
||||||
// MinorVer changes when additional features are added, but not for bug fixes (range 00-99)
|
// 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
|
// 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_RATE 2000000
|
||||||
#define MODES_DEFAULT_FREQ 1090000000
|
#define MODES_DEFAULT_FREQ 1090000000
|
||||||
|
@ -70,6 +70,8 @@
|
||||||
#define MODES_MSG_SQUELCH_LEVEL 0x02FF /* Average signal strength limit */
|
#define MODES_MSG_SQUELCH_LEVEL 0x02FF /* Average signal strength limit */
|
||||||
#define MODES_MSG_ENCODER_ERRS 3 /* Maximum number of encoding errors */
|
#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_US 8 /* microseconds = bits */
|
||||||
#define MODES_PREAMBLE_SAMPLES (MODES_PREAMBLE_US * 2)
|
#define MODES_PREAMBLE_SAMPLES (MODES_PREAMBLE_US * 2)
|
||||||
#define MODES_PREAMBLE_SIZE (MODES_PREAMBLE_SAMPLES * sizeof(uint16_t))
|
#define MODES_PREAMBLE_SIZE (MODES_PREAMBLE_SAMPLES * sizeof(uint16_t))
|
||||||
|
@ -2226,16 +2228,18 @@ void modesSendBeastOutput(struct modesMessage *mm) {
|
||||||
{*p++ = '2';}
|
{*p++ = '2';}
|
||||||
else if (msgLen == MODES_LONG_MSG_BYTES)
|
else if (msgLen == MODES_LONG_MSG_BYTES)
|
||||||
{*p++ = '3';}
|
{*p++ = '3';}
|
||||||
|
else if (msgLen == MODEA_MSG_BYTES)
|
||||||
|
{*p++ = '1';}
|
||||||
else
|
else
|
||||||
{return;}
|
{return;}
|
||||||
|
|
||||||
*p++ = mm->signalLevel;
|
|
||||||
|
|
||||||
pTimeStamp = (char *) &mm->timestampMsg;
|
pTimeStamp = (char *) &mm->timestampMsg;
|
||||||
for (j = 5; j >= 0; j--) {
|
for (j = 5; j >= 0; j--) {
|
||||||
*p++ = pTimeStamp[j];
|
*p++ = pTimeStamp[j];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*p++ = mm->signalLevel;
|
||||||
|
|
||||||
memcpy(p, mm->msg, msgLen);
|
memcpy(p, mm->msg, msgLen);
|
||||||
|
|
||||||
Modes.rawOutUsed += (msgLen + 9);
|
Modes.rawOutUsed += (msgLen + 9);
|
||||||
|
|
Loading…
Reference in a new issue