Fix AG response for simts590.c

pull/1404/head
Mike Black W9MDB 2023-10-18 17:14:37 -05:00
rodzic f5f8694a70
commit ec6c19854e
1 zmienionych plików z 12 dodań i 4 usunięć

Wyświetl plik

@ -29,6 +29,7 @@ int vfo, vfo_tx, ptt, ptt_data, ptt_mic, ptt_tune;
int keyspd = 25; int keyspd = 25;
int width_high = 0; int width_high = 0;
int width_low = 0; int width_low = 0;
int afgain = 50;
int int
getmyline(int fd, char *buf) getmyline(int fd, char *buf)
@ -152,11 +153,18 @@ int main(int argc, char *argv[])
pbuf = "MG050;"; pbuf = "MG050;";
WRITE(fd, pbuf, strlen(pbuf)); WRITE(fd, pbuf, strlen(pbuf));
} }
else if (strcmp(buf, "AG;") == 0) else if (strcmp(buf, "AG0;") == 0)
{ {
hl_usleep(mysleep * 1000); SNPRINTF(buf, sizeof(buf), "AG0%03d;", afgain);
pbuf = "AG100;"; WRITE(fd, buf, strlen(buf));
WRITE(fd, pbuf, strlen(pbuf)); }
else if (strncmp(buf, "AG0",3) == 0)
{
sscanf(buf,"AG0%d",&afgain);
}
else if (strncmp(buf,"AG",2) == 0)
{
WRITE(fd,"?;",2);
} }
else if (strcmp(buf, "FV;") == 0) else if (strcmp(buf, "FV;") == 0)
{ {