kopia lustrzana https://github.com/Hamlib/Hamlib
Reduce dependency on include/hamlib/rig.h
Remove some of the rig.h idioms. Not quite clean-room status, but less chance of the simulator simulating hamlib, rather than the real rig. More in next commit.pull/1626/head
rodzic
ebe685125e
commit
2b99b9d2ef
|
@ -16,6 +16,7 @@ struct ip_mreq
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <time.h>
|
||||||
#include <hamlib/rig.h>
|
#include <hamlib/rig.h>
|
||||||
|
|
||||||
#define BUFSIZE 256
|
#define BUFSIZE 256
|
||||||
|
@ -291,12 +292,12 @@ int main(int argc, char *argv[])
|
||||||
else if (strcmp(buf, "FV;") == 0)
|
else if (strcmp(buf, "FV;") == 0)
|
||||||
{
|
{
|
||||||
hl_usleep(mysleep * 1000);
|
hl_usleep(mysleep * 1000);
|
||||||
pbuf = "FV1.04;";
|
pbuf = "FV1.05;";
|
||||||
OUTPUT(pbuf);
|
OUTPUT(pbuf);
|
||||||
}
|
}
|
||||||
else if (strncmp(buf, "IS;", 3) == 0)
|
else if (strncmp(buf, "IS;", 3) == 0)
|
||||||
{
|
{
|
||||||
SNPRINTF(buf, sizeof(buf), "IS%+04d;", is);
|
snprintf(buf, sizeof(buf), "IS%+04d;", is);
|
||||||
OUTPUT(buf);
|
OUTPUT(buf);
|
||||||
}
|
}
|
||||||
else if (strncmp(buf, "IS", 2) == 0)
|
else if (strncmp(buf, "IS", 2) == 0)
|
||||||
|
@ -305,12 +306,12 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
else if (strncmp(buf, "SM;", 3) == 0)
|
else if (strncmp(buf, "SM;", 3) == 0)
|
||||||
{
|
{
|
||||||
SNPRINTF(buf, sizeof(buf), "SM0035;");
|
pbuf = "SM0035;";
|
||||||
OUTPUT(buf);
|
OUTPUT(pbuf);
|
||||||
}
|
}
|
||||||
else if (strncmp(buf, "PC;", 3) == 0)
|
else if (strncmp(buf, "PC;", 3) == 0)
|
||||||
{
|
{
|
||||||
SNPRINTF(buf, sizeof(buf), "PC%03d;", pc);
|
snprintf(buf, sizeof(buf), "PC%03d;", pc);
|
||||||
OUTPUT(buf);
|
OUTPUT(buf);
|
||||||
}
|
}
|
||||||
else if (strncmp(buf, "PC", 2) == 0)
|
else if (strncmp(buf, "PC", 2) == 0)
|
||||||
|
@ -334,7 +335,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
hl_usleep(mysleep * 1000);
|
hl_usleep(mysleep * 1000);
|
||||||
int id = 24;
|
int id = 24;
|
||||||
SNPRINTF(buf, sizeof(buf), "ID%03d;", id);
|
snprintf(buf, sizeof(buf), "ID%03d;", id);
|
||||||
OUTPUT(buf);
|
OUTPUT(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -471,7 +472,7 @@ int main(int argc, char *argv[])
|
||||||
#if 0
|
#if 0
|
||||||
else if (strncmp(buf, "DA;", 3) == 0)
|
else if (strncmp(buf, "DA;", 3) == 0)
|
||||||
{
|
{
|
||||||
SNPRINTF(buf, sizeof(buf), "DA%d;", datamode);
|
snprintf(buf, sizeof(buf), "DA%d;", datamode);
|
||||||
OUTPUT(buf);
|
OUTPUT(buf);
|
||||||
}
|
}
|
||||||
else if (strncmp(buf, "DA", 2) == 0)
|
else if (strncmp(buf, "DA", 2) == 0)
|
||||||
|
@ -575,7 +576,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (meter[i].enabled)
|
if (meter[i].enabled)
|
||||||
{
|
{
|
||||||
SNPRINTF(tbuf, sizeof tbuf, "RM%d%03d;", i + 1, meter[i].value);
|
snprintf(tbuf, sizeof tbuf, "RM%d%03d;", i + 1, meter[i].value);
|
||||||
pbuf = stpcpy(pbuf, tbuf);
|
pbuf = stpcpy(pbuf, tbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -703,7 +704,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
else if (strncmp(buf, "RL1;", 3) == 0)
|
else if (strncmp(buf, "RL1;", 3) == 0)
|
||||||
{
|
{
|
||||||
SNPRINTF(buf, sizeof(buf), "RL%02d;", rl);
|
snprintf(buf, sizeof(buf), "RL%02d;", rl);
|
||||||
OUTPUT(buf);
|
OUTPUT(buf);
|
||||||
}
|
}
|
||||||
else if (strncmp(buf, "RL1", 2) == 0)
|
else if (strncmp(buf, "RL1", 2) == 0)
|
||||||
|
@ -878,7 +879,7 @@ int main(int argc, char *argv[])
|
||||||
{ // TF-SET
|
{ // TF-SET
|
||||||
if (buf[2] == ';')
|
if (buf[2] == ';')
|
||||||
{
|
{
|
||||||
SNPRINTF(buf, sizeof buf, "TS%d;", tfset);
|
snprintf(buf, sizeof buf, "TS%d;", tfset);
|
||||||
OUTPUT(buf);
|
OUTPUT(buf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue