Default to not forwarding mlat messages. Add --forward-mlat option to enable it.
This commit is contained in:
parent
e5053ac5c9
commit
45d645a864
|
@ -694,6 +694,7 @@ void showHelp(void) {
|
|||
"--net-heartbeat <rate> TCP heartbeat rate in seconds (default: 60 sec; 0 to disable)\n"
|
||||
"--net-buffer <n> TCP buffer size 64Kb * (2^n) (default: n=0, 64Kb)\n"
|
||||
"--net-verbatim Do not apply CRC corrections to messages we forward; send unchanged\n"
|
||||
"--forward-mlat Allow forwarding of received mlat results to output ports\n"
|
||||
"--lat <latitude> Reference/receiver latitude for surface posn (opt)\n"
|
||||
"--lon <longitude> Reference/receiver longitude for surface posn (opt)\n"
|
||||
"--max-range <distance> Absolute maximum range for position decoding (in nm, default: 300)\n"
|
||||
|
@ -994,6 +995,8 @@ int main(int argc, char **argv) {
|
|||
Modes.net_sndbuf_size = atoi(argv[++j]);
|
||||
} else if (!strcmp(argv[j],"--net-verbatim")) {
|
||||
Modes.net_verbatim = 1;
|
||||
} else if (!strcmp(argv[j],"--forward-mlat")) {
|
||||
Modes.forward_mlat = 1;
|
||||
} else if (!strcmp(argv[j],"--onlyaddr")) {
|
||||
Modes.onlyaddr = 1;
|
||||
} else if (!strcmp(argv[j],"--metric")) {
|
||||
|
|
|
@ -309,6 +309,7 @@ struct { // Internal state
|
|||
int net_fatsv_port; // FlightAware TSV port
|
||||
int net_sndbuf_size; // TCP output buffer size (64Kb * 2^n)
|
||||
int net_verbatim; // if true, send the original message, not the CRC-corrected one
|
||||
int forward_mlat; // allow forwarding of mlat messages to output ports
|
||||
int quiet; // Suppress stdout
|
||||
uint32_t show_only; // Only show messages from this ICAO
|
||||
int interactive; // Interactive mode
|
||||
|
|
3
net_io.c
3
net_io.c
|
@ -637,6 +637,9 @@ static void send_sbs_heartbeat(struct net_service *service)
|
|||
//=========================================================================
|
||||
//
|
||||
void modesQueueOutput(struct modesMessage *mm) {
|
||||
if ((mm->bFlags & MODES_ACFLAGS_FROM_MLAT) && !Modes.forward_mlat)
|
||||
return;
|
||||
|
||||
modesSendSBSOutput(mm);
|
||||
modesSendBeastOutput(mm);
|
||||
modesSendRawOutput(mm);
|
||||
|
|
Loading…
Reference in a new issue