Mike Black W9MDB 2023-08-19 08:43:06 -05:00
rodzic 3492be2562
commit 1ad43a44ba
2 zmienionych plików z 223 dodań i 194 usunięć

Wyświetl plik

@ -49,6 +49,7 @@ int satmode = 0;
int agc_time = 1;
int ovf_status = 0;
int powerstat = 1;
int keyertype = 0;
void dumphex(unsigned char *buf, int n)
{
@ -412,15 +413,37 @@ void frameParse(int fd, unsigned char *frame, int len)
break;
case 0x07: // satmode
frame[4] = 0;
frame[7] = 0xfd;
n = write(fd, frame, 8);
break;
case 0x05:
{
int item = frame[6] * 256 + frame[7];
printf("0x05 *************************** item=%04x\n", item);
if (frame[8] != 0xfd) // then we're setting it
{
switch (item)
{
case 164:
keyertype = frame[8];
break;
}
frame[4] = 0xfb;
frame[5] = 0xfd;
n = write(fd, frame, 6);
}
else // we're reading it
{
switch (item)
case 164:
frame[8] = keyertype;
frame[9] = 0xfb;
break;
}
n = write(fd, frame, 10);
}
break;
}
case 0x1c:
switch (frame[5])

Wyświetl plik

@ -3568,9 +3568,9 @@ declare_proto_rig(set_parm)
if (strcmp(arg1,"KEYERTYPE")==0 && strcmp(arg2,"?") != 0)
{
if (strcmp(arg2,"STRAIGHT")==0) arg2 = "0";
else if (strcmp(arg2,"BUG")==0) arg2 = "1";
else if (strcmp(arg2,"PADDLE")==0) arg2 = "2";
if (strcmp(arg2,"STRAIGHT")==0) {arg2 = "0";}
else if (strcmp(arg2,"BUG")==0) {arg2 = "1";}
else if (strcmp(arg2,"PADDLE")==0) {arg2 = "2";}
}
parm = rig_parse_parm(arg1);
@ -3603,6 +3603,9 @@ declare_proto_rig(set_parm)
break;
case RIG_CONF_STRING:
if (parm == RIG_PARM_KEYERTYPE)
val.i = atoi(arg2);
else
val.cs = arg2;
break;
@ -3623,6 +3626,9 @@ declare_proto_rig(set_parm)
}
else if (RIG_PARM_IS_STRING(parm))
{
if (parm == RIG_PARM_KEYERTYPE)
val.i = atoi(arg2);
else
val.cs = arg2;
}
else