Merge branch 'master' into dev
This commit is contained in:
commit
671aac5f50
8
mode_s.c
8
mode_s.c
|
@ -681,12 +681,12 @@ int decodeModesMessage(struct modesMessage *mm, unsigned char *msg)
|
||||||
mm->airground = AG_UNCERTAIN;
|
mm->airground = AG_UNCERTAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mm->correctedbits && (mm->msgtype == 17 || mm->msgtype == 18 || (mm->msgtype == 11 && mm->IID == 0))) {
|
if (!mm->correctedbits && (mm->msgtype == 17 || (mm->msgtype == 11 && mm->IID == 0))) {
|
||||||
// No CRC errors seen, and either it was an DF17/18 extended squitter
|
// No CRC errors seen, and either it was an DF17 extended squitter
|
||||||
// or a DF11 acquisition squitter with II = 0. We probably have the right address.
|
// or a DF11 acquisition squitter with II = 0. We probably have the right address.
|
||||||
|
|
||||||
// We wait until here to do this as we may have needed to decode an ES to note
|
// Don't do this for DF18, as a DF18 transmitter doesn't necessarily have a
|
||||||
// the type of address in DF18 messages.
|
// Mode S transponder.
|
||||||
|
|
||||||
// NB this is the only place that adds addresses!
|
// NB this is the only place that adds addresses!
|
||||||
icaoFilterAdd(mm->addr);
|
icaoFilterAdd(mm->addr);
|
||||||
|
|
2
net_io.c
2
net_io.c
|
@ -1380,7 +1380,7 @@ char *generateAircraftJson(const char *url_path, int *len) {
|
||||||
10 * log10((a->signalLevel[0] + a->signalLevel[1] + a->signalLevel[2] + a->signalLevel[3] +
|
10 * log10((a->signalLevel[0] + a->signalLevel[1] + a->signalLevel[2] + a->signalLevel[3] +
|
||||||
a->signalLevel[4] + a->signalLevel[5] + a->signalLevel[6] + a->signalLevel[7] + 1e-5) / 8));
|
a->signalLevel[4] + a->signalLevel[5] + a->signalLevel[6] + a->signalLevel[7] + 1e-5) / 8));
|
||||||
|
|
||||||
if (p >= end) {
|
if ((p + 10) >= end) { // +10 to leave some space for the final line
|
||||||
// overran the buffer
|
// overran the buffer
|
||||||
int used = line_start - buf;
|
int used = line_start - buf;
|
||||||
buflen *= 2;
|
buflen *= 2;
|
||||||
|
|
Loading…
Reference in a new issue