kopia lustrzana https://github.com/Hamlib/Hamlib
rodzic
08c82ddbb5
commit
0fe15fa858
1
NEWS
1
NEWS
|
@ -13,6 +13,7 @@ Version 5.x -- future
|
|||
* Change FT1000MP Mark V model names to align with FT1000MP
|
||||
|
||||
Version 4.6
|
||||
* Added Guoehe PMR-171
|
||||
* Added csntechnoligies.net S.A.T Satellite rotor control
|
||||
* Added PSTRotator control
|
||||
* Added Flex SmartSDR slices A-H
|
||||
|
|
|
@ -143,6 +143,7 @@
|
|||
#define RIG_MODEL_FT710 RIG_MAKE_MODEL(RIG_YAESU, 49)
|
||||
#define RIG_MODEL_FT9000OLD RIG_MAKE_MODEL(RIG_YAESU, 50)
|
||||
#define RIG_MODEL_Q900 RIG_MAKE_MODEL(RIG_YAESU, 51)
|
||||
#define RIG_MODEL_PMR171 RIG_MAKE_MODEL(RIG_YAESU, 52)
|
||||
|
||||
/*
|
||||
* Kenwood
|
||||
|
|
|
@ -6,7 +6,7 @@ YAESUSRC = ft100.c ft100.h ft747.c ft747.h ft817.c ft817.h ft847.c ft847.h \
|
|||
ft857.c ft857.h ft897.c ft897.h ft990.c ft990.h ft990v12.c ft990v12.h frg8800.c ft757gx.c \
|
||||
ft757gx.h ft600.h ft600.c ft736.c frg100.c frg100.h frg9600.c ft1000d.c \
|
||||
ft1000d.h vr5000.c ft767gx.c ft767gx.h ft840.c ft840.h ft980.c ft980.h \
|
||||
vx1700.c vx1700.h ftdx10.h ft710.c
|
||||
vx1700.c vx1700.h ftdx10.h ft710.c pmr171.c
|
||||
|
||||
## Yaesu radios that use the new Kenwood style CAT commands
|
||||
NEWCATSRC = newcat.c newcat.h ft450.c ft450.h ft950.c ft950.h ft991.c ft991.h \
|
||||
|
|
Plik diff jest za duży
Load Diff
|
@ -123,6 +123,7 @@ DECLARE_INITRIG_BACKEND(yaesu)
|
|||
rig_register(&ft650_caps);
|
||||
rig_register(&ft710_caps);
|
||||
rig_register(&q900_caps);
|
||||
rig_register(&pmr171_caps);
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
|
|
@ -94,5 +94,6 @@ extern struct rig_caps ft650_caps;
|
|||
extern struct rig_caps ft710_caps;
|
||||
extern struct rig_caps ft9000Old_caps;
|
||||
extern struct rig_caps q900_caps;
|
||||
extern struct rig_caps pmr171_caps;
|
||||
|
||||
#endif /* _YAESU_H */
|
||||
|
|
|
@ -8,7 +8,7 @@ DISTCLEANFILES =
|
|||
|
||||
bin_PROGRAMS =
|
||||
|
||||
check_PROGRAMS = simelecraft simicgeneric simkenwood simyaesu simic9100 simic9700 simft991 simftdx1200 simftdx3000 simjupiter simpowersdr simid5100 simft736 simftdx5000 simtmd700 simrotorez simspid simft817 simts590 simft847 simic7300 simic7000 simic7100 simic7200 simatd578 simic905 simts450 simic7600 simic7610 simic705 simts950 simts990 simic7851 simftdx101 simxiegug90 simqrplabs simft818 simic275 simtrusdx simft1000 simtmd710 simts890 simxiegux108g simxiegux6100 simic910 simft450 simelecraftk4 simmicom simflex simft710 simic2730 simorion
|
||||
check_PROGRAMS = simelecraft simicgeneric simkenwood simyaesu simic9100 simic9700 simft991 simftdx1200 simftdx3000 simjupiter simpowersdr simid5100 simft736 simftdx5000 simtmd700 simrotorez simspid simft817 simts590 simft847 simic7300 simic7000 simic7100 simic7200 simatd578 simic905 simts450 simic7600 simic7610 simic705 simts950 simts990 simic7851 simftdx101 simxiegug90 simqrplabs simft818 simic275 simtrusdx simft1000 simtmd710 simts890 simxiegux108g simxiegux6100 simic910 simft450 simelecraftk4 simmicom simflex simft710 simic2730 simorion simpmr171
|
||||
|
||||
simelecraft_SOURCES = simelecraft.c
|
||||
simkenwood_SOURCES = simkenwood.c
|
||||
|
|
|
@ -0,0 +1,126 @@
|
|||
// can run this using rigctl/rigctld and socat pty devices
|
||||
// gcc -o simprm171 simprm171.c
|
||||
#define _XOPEN_SOURCE 700
|
||||
// since we are POSIX here we need this
|
||||
#if 0
|
||||
struct ip_mreq
|
||||
{
|
||||
int dummy;
|
||||
};
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "../include/hamlib/rig.h"
|
||||
|
||||
#define BUFSIZE 256
|
||||
|
||||
float freqA = 14074000;
|
||||
float freqB = 14074500;
|
||||
char tx_vfo = '0';
|
||||
char rx_vfo = '0';
|
||||
char modeA = '1';
|
||||
char modeB = '1';
|
||||
int width_main = 500;
|
||||
int width_sub = 700;
|
||||
|
||||
|
||||
int
|
||||
getmyline(int fd, unsigned char *buf)
|
||||
{
|
||||
unsigned char c;
|
||||
int i = 0;
|
||||
int n = 0;
|
||||
memset(buf, 0, BUFSIZE);
|
||||
|
||||
while (i < 5 && read(fd, &c, 1) > 0)
|
||||
{
|
||||
buf[i++] = c;
|
||||
n++;
|
||||
}
|
||||
|
||||
printf("n1=%d %02x %02x %02x %02x %02x\n", n, buf[0], buf[1], buf[2], buf[3],
|
||||
buf[4]);
|
||||
|
||||
i = buf[4]; // length of packet
|
||||
n = read(fd, &buf[5], i);
|
||||
printf("read %d bytes\n", n);
|
||||
if (n == 0) return 0;
|
||||
n += 5;
|
||||
printf("n2=%d", n);
|
||||
for( i = 0; i < n; ++i) printf(" x%02x", buf[i]);
|
||||
printf("\n");
|
||||
return n;
|
||||
}
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
int openPort(char *comport) // doesn't matter for using pts devices
|
||||
{
|
||||
int fd;
|
||||
fd = open(comport, O_RDWR);
|
||||
|
||||
if (fd < 0)
|
||||
{
|
||||
perror(comport);
|
||||
}
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
#else
|
||||
int openPort(char *comport) // doesn't matter for using pts devices
|
||||
{
|
||||
int fd = posix_openpt(O_RDWR);
|
||||
char *name = ptsname(fd);
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
perror("pstname");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("name=%s\n", name);
|
||||
|
||||
if (fd == -1 || grantpt(fd) == -1 || unlockpt(fd) == -1)
|
||||
{
|
||||
perror("posix_openpt");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return fd;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
unsigned char buf[256];
|
||||
|
||||
again:
|
||||
int fd = openPort(argv[1]);
|
||||
|
||||
while (1)
|
||||
{
|
||||
int bytes = getmyline(fd, buf);
|
||||
|
||||
if (bytes == 0)
|
||||
{
|
||||
close(fd);
|
||||
goto again;
|
||||
}
|
||||
|
||||
switch (buf[5])
|
||||
{
|
||||
case 0x07: printf("PTT=%d\n", buf[6]); write(fd,buf,9);break;
|
||||
case 0x0c: printf("Power=%d\n", buf[6]); break;
|
||||
|
||||
default: printf("Unknown cmd=%02x\n", buf[4]);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Ładowanie…
Reference in New Issue