Try to configure whatever faup1090 connects to for the settings we want.

This commit is contained in:
Oliver Jowett 2016-07-13 10:02:15 +01:00
parent b2aaa23984
commit 474b564385

View file

@ -130,6 +130,22 @@ static void backgroundTasks(void) {
modesNetPeriodicWork(); 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); exit (1);
} }
sendBeastSettings(c, "Cdfgj"); // Beast binary, no filters, CRC checks on, GPS timestamps, no mode A/C
// Set up output connection on stdout // Set up output connection on stdout
fatsv_output = makeFatsvOutputService(); fatsv_output = makeFatsvOutputService();
createGenericClient(fatsv_output, STDOUT_FILENO); createGenericClient(fatsv_output, STDOUT_FILENO);