diff --git a/simulators/Makefile.am b/simulators/Makefile.am index 811db29a6..73ca41c19 100644 --- a/simulators/Makefile.am +++ b/simulators/Makefile.am @@ -8,7 +8,7 @@ DISTCLEANFILES = bin_PROGRAMS = -check_PROGRAMS = simelecraft simicom simkenwood simyaesu simicom9700 simft991 simftdx1200 simftdx3000 simjupiter simpowersdr simid5100 simft736 simftdx5000 simtmd700 +check_PROGRAMS = simelecraft simicom simkenwood simyaesu simicom9700 simft991 simftdx1200 simftdx3000 simjupiter simpowersdr simid5100 simft736 simftdx5000 simtmd700 simrotorez simelecraft_SOURCES = simelecraft.c simicom_SOURCES = simicom.c diff --git a/simulators/simrotorez.c b/simulators/simrotorez.c new file mode 100644 index 000000000..2fdfa142b --- /dev/null +++ b/simulators/simrotorez.c @@ -0,0 +1,127 @@ +// can run this using rigctl/rigctld and socat pty devices +// gcc -o simspid simspid.c +#define _XOPEN_SOURCE 600 +#include +#include +#include +#include +#include +#include "../include/hamlib/rig.h" + +#define BUFSIZE 256 + +float az = 0; +float el = 0; + +int +getmyline(int fd, char *buf) +{ + unsigned char c; + int i = 0; + int n = 0; + memset(buf, 0, BUFSIZE); + + while (read(fd, &c, 1) > 0 && c!=';') + { + buf[i++] = c; + n++; + for(int i=0;i