Factor out sendBeastSettings(), use it in view1090.

This commit is contained in:
Oliver Jowett 2016-12-29 17:53:04 +00:00
parent 11b6cdba06
commit 0526388bdc
4 changed files with 24 additions and 16 deletions

View file

@ -139,22 +139,6 @@ 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);
}
//
//=========================================================================
//