kopia lustrzana https://github.com/Hamlib/Hamlib
* misc update
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@430 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.1.1
rodzic
cc52bc5495
commit
a37d228615
|
@ -6,7 +6,7 @@
|
||||||
* via serial interface to a Kenwood radio.
|
* via serial interface to a Kenwood radio.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* $Id: kenwood.c,v 1.2 2001-02-27 23:06:53 f4cfe Exp $
|
* $Id: kenwood.c,v 1.3 2001-03-02 18:40:15 f4cfe Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
@ -43,6 +43,8 @@
|
||||||
#include "kenwood.h"
|
#include "kenwood.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define EOM ';'
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* modes in use by the "MD" command
|
* modes in use by the "MD" command
|
||||||
*/
|
*/
|
||||||
|
@ -50,6 +52,9 @@
|
||||||
#define MD_USB '2'
|
#define MD_USB '2'
|
||||||
#define MD_CW '3'
|
#define MD_CW '3'
|
||||||
#define MD_FM '4'
|
#define MD_FM '4'
|
||||||
|
#define MD_AM '5'
|
||||||
|
#define MD_FSK '6'
|
||||||
|
#define MD_CWN '7' /* at least on R-5000 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* kenwood_transaction
|
* kenwood_transaction
|
||||||
|
@ -73,7 +78,7 @@ int kenwood_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, int
|
||||||
i = 0;
|
i = 0;
|
||||||
do {
|
do {
|
||||||
fread_block(rs->stream, data+i, 1, rs->timeout);
|
fread_block(rs->stream, data+i, 1, rs->timeout);
|
||||||
} while (data[i++] != ';');
|
} while (data[i++] != EOM);
|
||||||
|
|
||||||
*data_len = i;
|
*data_len = i;
|
||||||
|
|
||||||
|
@ -122,7 +127,7 @@ int kenwood_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||||
*/
|
*/
|
||||||
cmdbuf[0] = 'F';
|
cmdbuf[0] = 'F';
|
||||||
cmdbuf[1] = vfo==RIG_VFO_A? 'A':'B';
|
cmdbuf[1] = vfo==RIG_VFO_A? 'A':'B';
|
||||||
cmdbuf[2] = ';';
|
cmdbuf[2] = EOM;
|
||||||
|
|
||||||
kenwood_transaction (rig, cmdbuf, 3, freqbuf, &freq_len);
|
kenwood_transaction (rig, cmdbuf, 3, freqbuf, &freq_len);
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* This programs dumps the capabilities of a backend rig.
|
* This programs dumps the capabilities of a backend rig.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* $Id: dumpcaps.c,v 1.15 2001-03-01 21:23:32 f4cfe Exp $
|
* $Id: dumpcaps.c,v 1.16 2001-03-02 18:43:25 f4cfe Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -48,6 +48,7 @@ int main (int argc, char *argv[])
|
||||||
status |= rig_load_backend("ft847");
|
status |= rig_load_backend("ft847");
|
||||||
status |= rig_load_backend("kenwood");
|
status |= rig_load_backend("kenwood");
|
||||||
status |= rig_load_backend("aor");
|
status |= rig_load_backend("aor");
|
||||||
|
status |= rig_load_backend("pcr");
|
||||||
rig_load_backend("winradio"); /* may not be compiled ... */
|
rig_load_backend("winradio"); /* may not be compiled ... */
|
||||||
rig_load_backend("dummy");
|
rig_load_backend("dummy");
|
||||||
|
|
||||||
|
@ -201,6 +202,10 @@ int main (int argc, char *argv[])
|
||||||
caps->max_rit/1000, caps->max_rit%1000,
|
caps->max_rit/1000, caps->max_rit%1000,
|
||||||
caps->max_rit/1000, caps->max_rit%1000);
|
caps->max_rit/1000, caps->max_rit%1000);
|
||||||
|
|
||||||
|
printf("Max IF-SHIFT: -%ld.%ldkHz/+%ld.%ldkHz\n",
|
||||||
|
caps->max_ifshift/1000, caps->max_ifshift%1000,
|
||||||
|
caps->max_ifshift/1000, caps->max_ifshift%1000);
|
||||||
|
|
||||||
printf("Preamp:");
|
printf("Preamp:");
|
||||||
for(i=0; i<MAXDBLSTSIZ && caps->preamp[i] != 0; i++)
|
for(i=0; i<MAXDBLSTSIZ && caps->preamp[i] != 0; i++)
|
||||||
printf(" %ddB", caps->preamp[i]);
|
printf(" %ddB", caps->preamp[i]);
|
||||||
|
@ -391,8 +396,8 @@ int main (int argc, char *argv[])
|
||||||
printf("Can get CTCSS squelch:\t%c\n",caps->get_ctcss_sql!=NULL?'Y':'N');
|
printf("Can get CTCSS squelch:\t%c\n",caps->get_ctcss_sql!=NULL?'Y':'N');
|
||||||
printf("Can set DCS squelch:\t%c\n",caps->set_dcs_sql!=NULL?'Y':'N');
|
printf("Can set DCS squelch:\t%c\n",caps->set_dcs_sql!=NULL?'Y':'N');
|
||||||
printf("Can get DCS squelch:\t%c\n",caps->get_dcs_sql!=NULL?'Y':'N');
|
printf("Can get DCS squelch:\t%c\n",caps->get_dcs_sql!=NULL?'Y':'N');
|
||||||
printf("Can set power on:\t%c\n",caps->set_poweron!=NULL?'Y':'N');
|
printf("Can set power stat:\t%c\n",caps->set_powerstat!=NULL?'Y':'N');
|
||||||
printf("Can set power off:\t%c\n",caps->set_poweroff!=NULL?'Y':'N');
|
printf("Can get power stat:\t%c\n",caps->get_powerstat!=NULL?'Y':'N');
|
||||||
printf("Can set transceive:\t%c\n",caps->set_trn!=NULL?'Y':'N');
|
printf("Can set transceive:\t%c\n",caps->set_trn!=NULL?'Y':'N');
|
||||||
printf("Can get transceive:\t%c\n",caps->get_trn!=NULL?'Y':'N');
|
printf("Can get transceive:\t%c\n",caps->get_trn!=NULL?'Y':'N');
|
||||||
printf("Can set func:\t%c\n",caps->set_func!=NULL?'Y':'N');
|
printf("Can set func:\t%c\n",caps->set_func!=NULL?'Y':'N');
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* This programs list all the available the rig capabilities.
|
* This programs list all the available the rig capabilities.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* $Id: listrigs.c,v 1.6 2001-02-14 01:12:59 f4cfe Exp $
|
* $Id: listrigs.c,v 1.7 2001-03-02 18:43:25 f4cfe Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -119,6 +119,11 @@ int main (int argc, char *argv[])
|
||||||
printf("rig_load_backend: aor error = %s \n", rigerror(status));
|
printf("rig_load_backend: aor error = %s \n", rigerror(status));
|
||||||
exit(3);
|
exit(3);
|
||||||
}
|
}
|
||||||
|
status = rig_load_backend("pcr");
|
||||||
|
if (status != RIG_OK ) {
|
||||||
|
printf("rig_load_backend: pcr error = %s \n", rigerror(status));
|
||||||
|
exit(3);
|
||||||
|
}
|
||||||
rig_load_backend("winradio"); /* may not be compiled .. */
|
rig_load_backend("winradio"); /* may not be compiled .. */
|
||||||
rig_load_backend("dummy");
|
rig_load_backend("dummy");
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* TODO: be more generic and add command line option to run
|
* TODO: be more generic and add command line option to run
|
||||||
* in non-interactive mode
|
* in non-interactive mode
|
||||||
*
|
*
|
||||||
* $Id: rigctl.c,v 1.9 2001-03-01 21:25:45 f4cfe Exp $
|
* $Id: rigctl.c,v 1.10 2001-03-02 18:43:25 f4cfe Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -171,6 +171,7 @@ int main (int argc, char *argv[])
|
||||||
retcode |= rig_load_backend("ft847");
|
retcode |= rig_load_backend("ft847");
|
||||||
retcode |= rig_load_backend("kenwood");
|
retcode |= rig_load_backend("kenwood");
|
||||||
retcode |= rig_load_backend("aor");
|
retcode |= rig_load_backend("aor");
|
||||||
|
retcode |= rig_load_backend("pcr");
|
||||||
rig_load_backend("winradio");
|
rig_load_backend("winradio");
|
||||||
rig_load_backend("dummy");
|
rig_load_backend("dummy");
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* The code is rather ugly since this is only a try out.
|
* The code is rather ugly since this is only a try out.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* $Id: rigmatrix.c,v 1.9 2001-03-01 21:23:32 f4cfe Exp $
|
* $Id: rigmatrix.c,v 1.10 2001-03-02 18:43:25 f4cfe Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -232,8 +232,8 @@ int print_caps_caps(const struct rig_caps *caps, void *data)
|
||||||
print_yn(caps->get_ctcss);
|
print_yn(caps->get_ctcss);
|
||||||
print_yn(caps->set_dcs);
|
print_yn(caps->set_dcs);
|
||||||
print_yn(caps->get_dcs);
|
print_yn(caps->get_dcs);
|
||||||
print_yn(caps->set_poweron);
|
print_yn(caps->set_powerstat);
|
||||||
print_yn(caps->set_poweroff);
|
print_yn(caps->get_powerstat);
|
||||||
print_yn(caps->set_trn);
|
print_yn(caps->set_trn);
|
||||||
print_yn(caps->set_trn);
|
print_yn(caps->set_trn);
|
||||||
print_yn(caps->decode_event);
|
print_yn(caps->decode_event);
|
||||||
|
@ -529,6 +529,11 @@ int main (int argc, char *argv[])
|
||||||
printf("rig_load_backend: aor error = %s \n", rigerror(status));
|
printf("rig_load_backend: aor error = %s \n", rigerror(status));
|
||||||
exit(3);
|
exit(3);
|
||||||
}
|
}
|
||||||
|
status = rig_load_backend("pcr");
|
||||||
|
if (status != RIG_OK ) {
|
||||||
|
printf("rig_load_backend: pcr error = %s \n", rigerror(status));
|
||||||
|
exit(3);
|
||||||
|
}
|
||||||
rig_load_backend("winradio"); /* may not be compiled ... */
|
rig_load_backend("winradio"); /* may not be compiled ... */
|
||||||
rig_load_backend("dummy");
|
rig_load_backend("dummy");
|
||||||
|
|
||||||
|
@ -575,7 +580,7 @@ int main (int argc, char *argv[])
|
||||||
"<TD>Set ts</TD><TD>Get ts</TD>"
|
"<TD>Set ts</TD><TD>Get ts</TD>"
|
||||||
"<TD>Set CTCSS</TD><TD>Get CTCSS</TD>"
|
"<TD>Set CTCSS</TD><TD>Get CTCSS</TD>"
|
||||||
"<TD>Set DCS</TD><TD>Get DCS</TD>"
|
"<TD>Set DCS</TD><TD>Get DCS</TD>"
|
||||||
"<TD>Set PowerON</TD><TD>Set PowerOFF</TD>"
|
"<TD>Set Power Stat</TD><TD>Get Power Stat</TD>"
|
||||||
"<TD>Set trn</TD><TD>Get trn</TD>"
|
"<TD>Set trn</TD><TD>Get trn</TD>"
|
||||||
"<TD>Decode</TD>"
|
"<TD>Decode</TD>"
|
||||||
"</TR>\n");
|
"</TR>\n");
|
||||||
|
|
Ładowanie…
Reference in New Issue