From 474b5643853c505a64b90ac8f716edbe4129c570 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Wed, 13 Jul 2016 10:02:15 +0100 Subject: [PATCH 1/2] Try to configure whatever faup1090 connects to for the settings we want. --- faup1090.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/faup1090.c b/faup1090.c index 1ca0a01..2ef8c77 100644 --- a/faup1090.c +++ b/faup1090.c @@ -130,6 +130,22 @@ static void backgroundTasks(void) { modesNetPeriodicWork(); } +static void sendBeastSettings(struct client *c, const char *settings) { + int len; + char *buf, *p; + + len = strlen(settings) * 3; + buf = p = alloca(len); + + while (*settings) { + *p++ = 0x1a; + *p++ = '1'; + *p++ = *settings++; + } + + anetWrite(c->fd, buf, len); +} + // //========================================================================= // @@ -193,6 +209,8 @@ int main(int argc, char **argv) { exit (1); } + sendBeastSettings(c, "Cdfgj"); // Beast binary, no filters, CRC checks on, GPS timestamps, no mode A/C + // Set up output connection on stdout fatsv_output = makeFatsvOutputService(); createGenericClient(fatsv_output, STDOUT_FILENO); From 1e5a6fd854c955732979f270581d4fb03b0c00b7 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Wed, 13 Jul 2016 10:56:54 +0100 Subject: [PATCH 2/2] Don't touch the GPS setting (I had it backwards anyway). --- faup1090.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faup1090.c b/faup1090.c index 2ef8c77..8a29f95 100644 --- a/faup1090.c +++ b/faup1090.c @@ -209,7 +209,7 @@ int main(int argc, char **argv) { exit (1); } - sendBeastSettings(c, "Cdfgj"); // Beast binary, no filters, CRC checks on, GPS timestamps, no mode A/C + sendBeastSettings(c, "Cdfj"); // Beast binary, no filters, CRC checks on, no mode A/C // Set up output connection on stdout fatsv_output = makeFatsvOutputService();