Make the output of simft990 more friendly

pull/1831/head
Daniele Forsi IU5HKX 2025-08-05 22:16:48 +02:00
rodzic 9dd0009f9e
commit af4c6ec806
1 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -7,6 +7,7 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include "sim.h"
float freqA = 14074000; float freqA = 14074000;
float freqB = 14074500; float freqB = 14074500;
@ -44,14 +45,11 @@ static void load_dat(const char *filename, unsigned char buf[ALL_DATA_SIZE])
} }
fclose(fp); fclose(fp);
printf("%d bytes read\n", n); printf("%d bytes read from file %s\n", n, filename);
} }
static unsigned char alldata[ALL_DATA_SIZE]; static unsigned char alldata[ALL_DATA_SIZE];
#include "sim.h"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
unsigned char buf[BUFSIZE]; unsigned char buf[BUFSIZE];
@ -68,8 +66,11 @@ int main(int argc, char *argv[])
if (bytes != 5) if (bytes != 5)
{ {
printf("Not 5 bytes? bytes=%d\n", bytes); printf("Not 5 bytes? bytes=%d\n", bytes);
continue;
} }
// Protocol of rigs/yaesu/ft990v12.c
if (buf[4] == 0x10) if (buf[4] == 0x10)
{ {
write(fd, alldata, ALL_DATA_SIZE); write(fd, alldata, ALL_DATA_SIZE);