kopia lustrzana https://github.com/Hamlib/Hamlib
Update LGPL header in Kenwood source files.
TNX to Lucian Laga, YO6PLB, for the notification.Hamlib-1.2.15
rodzic
801f224fc8
commit
8d16bebf40
|
@ -3,10 +3,11 @@
|
|||
* Copyright (C) 2010,2011 by Nate Bargmann, n0nb@n0nb.us
|
||||
* Copyright (C) 2011 by Alexander Sack, Alexander Sack, pisymbol@gmail.com
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -15,10 +16,10 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* See the file 'COPYING.LIB' in the main Hamlib distribution directory for
|
||||
* the complete text of the GNU Lesser Public License version 2.
|
||||
* the complete text of the GNU Lesser Public License version 2.1.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
* Hamlib Elecraft backend--support extensions to Kenwood commands
|
||||
* Copyright (C) 2010 by Nate Bargmann, n0nb@n0nb.us
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -14,7 +15,7 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
/*
|
||||
* Hamlib Kenwood backend - IC-10 interface for:
|
||||
* TS-940, TS-811, TS-711, TS-440, and R-5000
|
||||
* TS-940, TS-811, TS-711, TS-440, and R-5000
|
||||
*
|
||||
* Copyright (c) 2000-2010 by Stephane Fillod and others
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -71,7 +71,7 @@ int ic10_cmd_trim (char *data, int data_len) {
|
|||
/**
|
||||
* ic10_transaction
|
||||
* Assumes rig!=NULL rig->state!=NULL rig->caps!=NULL
|
||||
**/
|
||||
**/
|
||||
int ic10_transaction (RIG *rig, const char *cmd, int cmd_len, char *data, int *data_len)
|
||||
{
|
||||
int retval;
|
||||
|
@ -94,11 +94,11 @@ int ic10_transaction (RIG *rig, const char *cmd, int cmd_len, char *data, int *d
|
|||
if (retval < 0)
|
||||
return retval;
|
||||
*data_len = retval;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Get the anwser of IF command, with retry handling
|
||||
*/
|
||||
static int get_ic10_if (RIG *rig, char *data)
|
||||
|
@ -112,7 +112,7 @@ static int get_ic10_if (RIG *rig, char *data)
|
|||
if (retval != RIG_OK)
|
||||
continue;
|
||||
|
||||
if (retval == RIG_OK &&
|
||||
if (retval == RIG_OK &&
|
||||
(data_len < priv->if_len ||
|
||||
data[0] != 'I' || data[1] != 'F')) {
|
||||
rig_debug(RIG_DEBUG_WARN,"%s: unexpected answer %s, len=%d\n",
|
||||
|
@ -141,7 +141,7 @@ int ic10_set_vfo(RIG *rig, vfo_t vfo)
|
|||
case RIG_VFO_B: vfo_function = '1'; break;
|
||||
case RIG_VFO_MEM: vfo_function = '2'; break;
|
||||
case RIG_VFO_CURR: return RIG_OK;
|
||||
default:
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %d\n",
|
||||
__func__, vfo);
|
||||
return -RIG_EINVAL;
|
||||
|
@ -182,7 +182,7 @@ int ic10_get_vfo(RIG *rig, vfo_t *vfo)
|
|||
case '0': *vfo = RIG_VFO_A; break;
|
||||
case '1': *vfo = RIG_VFO_B; break;
|
||||
case '2': *vfo = RIG_VFO_MEM; break;
|
||||
default:
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %c\n",
|
||||
__func__, c);
|
||||
return -RIG_EPROTO;
|
||||
|
@ -196,7 +196,7 @@ int ic10_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
|
|||
char ackbuf[16];
|
||||
int ack_len;
|
||||
|
||||
return ic10_transaction (rig, split==RIG_SPLIT_ON? "SP1;":"SP0;", 4,
|
||||
return ic10_transaction (rig, split==RIG_SPLIT_ON? "SP1;":"SP0;", 4,
|
||||
ackbuf, &ack_len);
|
||||
}
|
||||
|
||||
|
@ -283,12 +283,12 @@ int ic10_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
case RIG_MODE_FM : mode_letter = MD_FM; break;
|
||||
case RIG_MODE_AM : mode_letter = MD_AM; break;
|
||||
case RIG_MODE_RTTY : mode_letter = MD_FSK; break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode %d\n",
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode %d\n",
|
||||
__func__,mode);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
||||
|
||||
mode_len = sprintf(modebuf,"MD%c;", mode_letter);
|
||||
retval = ic10_transaction (rig, modebuf, mode_len, ackbuf, &ack_len);
|
||||
|
||||
|
@ -438,7 +438,7 @@ int ic10_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
|
|||
switch (ptt) {
|
||||
case RIG_PTT_OFF: ptt_letter = 'R'; break;
|
||||
case RIG_PTT_ON : ptt_letter = 'T'; break;
|
||||
default:
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: unsupported PTT %d\n",
|
||||
__func__,ptt);
|
||||
return -RIG_EINVAL;
|
||||
|
@ -697,7 +697,7 @@ int ic10_set_parm(RIG *rig, setting_t parm, value_t val)
|
|||
return ic10_transaction (rig, cmdbuf, cmd_len, NULL, NULL);
|
||||
break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: Unsupported set_parm %d\n",
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: Unsupported set_parm %d\n",
|
||||
__func__,parm);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
@ -738,7 +738,7 @@ int ic10_get_parm(RIG *rig, setting_t parm, value_t *val)
|
|||
10*lvlbuf[7] + lvlbuf[8]; /* seconds */
|
||||
break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: Unsupported get_parm %d\n",
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: Unsupported get_parm %d\n",
|
||||
__func__,parm);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
@ -839,7 +839,7 @@ int ic10_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
|
|||
switch(op) {
|
||||
case RIG_OP_UP : cmd = "UP;"; break;
|
||||
case RIG_OP_DOWN : cmd = "DN;"; break;
|
||||
default:
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: unsupported op %#x\n",
|
||||
__func__,op);
|
||||
return -RIG_EINVAL;
|
||||
|
@ -858,7 +858,7 @@ int ic10_scan(RIG * rig, vfo_t vfo, scan_t scan, int ch)
|
|||
char ackbuf[16];
|
||||
int ack_len;
|
||||
|
||||
return ic10_transaction (rig, scan==RIG_SCAN_STOP? "SC0;":"SC1;", 4,
|
||||
return ic10_transaction (rig, scan==RIG_SCAN_STOP? "SC0;":"SC1;", 4,
|
||||
ackbuf, &ack_len);
|
||||
}
|
||||
|
||||
|
@ -934,7 +934,7 @@ int ic10_decode_event (RIG *rig)
|
|||
case '0': vfo = RIG_VFO_A; break;
|
||||
case '1': vfo = RIG_VFO_B; break;
|
||||
case '2': vfo = RIG_VFO_MEM; break;
|
||||
default:
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %c\n",
|
||||
__func__, c);
|
||||
return -RIG_EPROTO;
|
||||
|
@ -968,7 +968,7 @@ int ic10_decode_event (RIG *rig)
|
|||
rig->callbacks.freq_event(rig, vfo, freq, rig->callbacks.freq_arg);
|
||||
}
|
||||
if (rig->callbacks.mode_event) {
|
||||
rig->callbacks.mode_event(rig, vfo, mode, RIG_PASSBAND_NORMAL,
|
||||
rig->callbacks.mode_event(rig, vfo, mode, RIG_PASSBAND_NORMAL,
|
||||
rig->callbacks.mode_arg);
|
||||
}
|
||||
if (rig->callbacks.ptt_event) {
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - IC-10 header
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: ic10.h,v 1.4 2005-04-10 21:57:13 fillods Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -15,10 +15,10 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* See the file 'COPYING.LIB' in the main Hamlib distribution directory for
|
||||
* the complete text of the GNU Lesser Public License version 2.
|
||||
* the complete text of the GNU Lesser Public License version 2.1.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -15,10 +15,10 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* See the file 'COPYING.LIB' in the main Hamlib distribution directory for
|
||||
* the complete text of the GNU Lesser Public License version 2.
|
||||
* the complete text of the GNU Lesser Public License version 2.1.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -4,19 +4,19 @@
|
|||
* Copyright (C) 2009 Alessandro Zummo <a.zummo@towertech.it>
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -133,8 +133,8 @@ const tone_t kenwood38_ctcss_list[] = {
|
|||
};
|
||||
|
||||
|
||||
/* Token definitions for .cfgparams in rig_caps
|
||||
*
|
||||
/* Token definitions for .cfgparams in rig_caps
|
||||
*
|
||||
* See enum rig_conf_e and struct confparams in rig.h
|
||||
*/
|
||||
const struct confparams kenwood_cfg_params[] = {
|
||||
|
|
|
@ -2,19 +2,20 @@
|
|||
* Hamlib Kenwood backend - main header
|
||||
* Copyright (c) 2000-2011 by Stephane Fillod
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - R5000 description
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: r5000.c,v 1.5 2009-01-28 23:30:47 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -84,7 +83,7 @@ const struct rig_caps r5000_caps = {
|
|||
.has_get_level = R5000_LEVEL_ALL,
|
||||
.has_set_level = RIG_LEVEL_SET(R5000_LEVEL_ALL),
|
||||
.has_get_parm = R5000_PARM_ALL,
|
||||
.has_set_parm = RIG_PARM_SET(R5000_PARM_ALL),
|
||||
.has_set_parm = RIG_PARM_SET(R5000_PARM_ALL),
|
||||
.parm_gran = {},
|
||||
.ctcss_list = NULL,
|
||||
.dcs_list = NULL,
|
||||
|
|
54
kenwood/th.c
54
kenwood/th.c
|
@ -4,19 +4,19 @@
|
|||
* Copyright (C) 2010 by Alessandro Zummo
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -416,7 +416,7 @@ th_get_vfo_char(RIG *rig, vfo_t *vfo, char *vfoch)
|
|||
rig_debug(RIG_DEBUG_TRACE, "%s: called\n", __func__);
|
||||
|
||||
/* Get VFO band */
|
||||
|
||||
|
||||
retval = kenwood_transaction(rig, "BC", 2, buf, &buf_size);
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
@ -424,7 +424,7 @@ th_get_vfo_char(RIG *rig, vfo_t *vfo, char *vfoch)
|
|||
case 5: /*original case BC 0*/
|
||||
vfoc = buf[3];
|
||||
break;
|
||||
case 7: /*intended for D700 BC 0,0*/
|
||||
case 7: /*intended for D700 BC 0,0*/
|
||||
if ((buf[0]=='B') &&(buf[1]=='C') && (buf[2]==' ') && (buf[4]=',')){
|
||||
vfoc = buf[3];
|
||||
} else {
|
||||
|
@ -522,13 +522,13 @@ int tm_set_vfo_bc2 (RIG *rig, vfo_t vfo)
|
|||
case RIG_VFO_VFO:
|
||||
vfonum = 0;
|
||||
/* put back split mode when toggling */
|
||||
txvfonum = (priv->split == RIG_SPLIT_ON &&
|
||||
txvfonum = (priv->split == RIG_SPLIT_ON &&
|
||||
rig->state.tx_vfo == RIG_VFO_B) ? 1 : vfonum;
|
||||
break;
|
||||
case RIG_VFO_B:
|
||||
vfonum = 1;
|
||||
/* put back split mode when toggling */
|
||||
txvfonum = (priv->split == RIG_SPLIT_ON &&
|
||||
txvfonum = (priv->split == RIG_SPLIT_ON &&
|
||||
rig->state.tx_vfo == RIG_VFO_A) ? 0 : vfonum;
|
||||
break;
|
||||
case RIG_VFO_MEM:
|
||||
|
@ -938,7 +938,7 @@ th_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
case RIG_VFO_VFO:
|
||||
case RIG_VFO_MEM:
|
||||
vch = '0'; break;
|
||||
case RIG_VFO_B:
|
||||
case RIG_VFO_B:
|
||||
vch = '1'; break;
|
||||
default:
|
||||
return kenwood_wrong_vfo(__func__, vfo);
|
||||
|
@ -997,7 +997,7 @@ th_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
break;
|
||||
|
||||
case RIG_LEVEL_RFPOWER:
|
||||
sprintf(buf, "PC %c",vch);
|
||||
sprintf(buf, "PC %c",vch);
|
||||
retval = kenwood_transaction(rig, buf, strlen(buf), ackbuf, &ack_len);
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
@ -1076,7 +1076,7 @@ int th_set_level (RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
case RIG_VFO_MEM:
|
||||
vch = '0';
|
||||
break;
|
||||
case RIG_VFO_B:
|
||||
case RIG_VFO_B:
|
||||
vch = '1';
|
||||
break;
|
||||
default:
|
||||
|
@ -1419,9 +1419,9 @@ th_set_mem(RIG *rig, vfo_t vfo, int ch)
|
|||
tvfo = (vfo == RIG_VFO_CURR) ? rig->state.current_vfo : vfo;
|
||||
|
||||
switch (tvfo) {
|
||||
case RIG_VFO_VFO:
|
||||
case RIG_VFO_MEM:
|
||||
case RIG_VFO_A:
|
||||
case RIG_VFO_VFO:
|
||||
case RIG_VFO_MEM:
|
||||
case RIG_VFO_A:
|
||||
vsel = '0';
|
||||
break;
|
||||
case RIG_VFO_B:
|
||||
|
@ -1471,7 +1471,7 @@ th_get_mem(RIG *rig, vfo_t vfo, int *ch)
|
|||
|
||||
switch (tvfo) {
|
||||
case RIG_VFO_VFO:
|
||||
case RIG_VFO_MEM:
|
||||
case RIG_VFO_MEM:
|
||||
case RIG_VFO_A:
|
||||
membuf = "MC 0";
|
||||
break;
|
||||
|
@ -1590,7 +1590,7 @@ int th_get_channel(RIG *rig, channel_t *chan)
|
|||
vfo_t vfo;
|
||||
const struct kenwood_priv_caps *priv=(const struct kenwood_priv_caps *)rig->caps->priv;
|
||||
const chan_t *chan_caps;
|
||||
|
||||
|
||||
if (chan->vfo == RIG_VFO_MEM) {
|
||||
|
||||
chan_caps = rig_lookup_mem_caps(rig, chan->channel_num);
|
||||
|
@ -1759,7 +1759,7 @@ int th_get_channel(RIG *rig, channel_t *chan)
|
|||
chan->dcs_sql=chan->dcs_code=0;
|
||||
|
||||
chan->tx_freq=RIG_FREQ_NONE;
|
||||
if (shift==RIG_RPT_SHIFT_NONE &&
|
||||
if (shift==RIG_RPT_SHIFT_NONE &&
|
||||
((chan_caps->type==RIG_MTYPE_MEM && chan_caps->start == 0) ||
|
||||
chan_caps->type==RIG_MTYPE_CALL)) {
|
||||
/* split ? */
|
||||
|
@ -1783,12 +1783,12 @@ int th_get_channel(RIG *rig, channel_t *chan)
|
|||
else
|
||||
sprintf(membuf, "MNA %s%03d",mr_extra,channel_num);
|
||||
ack_len=ACKBUF_LEN;
|
||||
|
||||
|
||||
/* Get memory name */
|
||||
retval = kenwood_transaction(rig, membuf, strlen(membuf), ackbuf, &ack_len);
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
||||
|
||||
if (ack_len > rig->caps->chan_desc_sz)
|
||||
ack_len = rig->caps->chan_desc_sz;
|
||||
|
||||
|
@ -1857,7 +1857,7 @@ int th_set_channel(RIG *rig, const channel_t *chan)
|
|||
return -RIG_EINVAL;
|
||||
tonefq++;
|
||||
}
|
||||
|
||||
|
||||
if (chan->ctcss_sql==0) {
|
||||
ctcss=0;
|
||||
ctcssfq=8;
|
||||
|
@ -1971,7 +1971,7 @@ int th_set_channel(RIG *rig, const channel_t *chan)
|
|||
/* Without DCS,mode */
|
||||
retval = sprintf(membuf, "%s,%011"PRIll",%X,%d,%d,%d,%d,,%02d,,%02d,%09"PRIll"%s",
|
||||
req, (int64_t)chan->freq, step, shift, rev, tone,
|
||||
ctcss, tonefq, ctcssfq,
|
||||
ctcss, tonefq, ctcssfq,
|
||||
(int64_t)abs(chan->rptr_offs), lockoutstr
|
||||
);
|
||||
}
|
||||
|
@ -1983,7 +1983,7 @@ int th_set_channel(RIG *rig, const channel_t *chan)
|
|||
return retval;
|
||||
|
||||
/* split ? */
|
||||
if (chan->tx_freq!=RIG_FREQ_NONE &&
|
||||
if (chan->tx_freq!=RIG_FREQ_NONE &&
|
||||
((chan_caps->type==RIG_MTYPE_MEM && chan_caps->start == 0) ||
|
||||
chan_caps->type==RIG_MTYPE_CALL)) {
|
||||
|
||||
|
|
18
kenwood/th.h
18
kenwood/th.h
|
@ -3,19 +3,19 @@
|
|||
* Copyright (c) 2001-2010 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
#ifndef __TH_H__
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
* Copyright (c) 2000-2010 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -132,7 +132,7 @@ const struct rig_caps thd7a_caps = {
|
|||
{ 221,222, RIG_MTYPE_CALL, {TH_CHANNEL_CAPS}}, /* Call 0/1 */
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
|
||||
.rx_range_list1 = { RIG_FRNG_END, }, /* FIXME: enter region 1 setting */
|
||||
.tx_range_list1 = { RIG_FRNG_END, },
|
||||
.rx_range_list2 = {
|
||||
|
|
|
@ -4,19 +4,19 @@
|
|||
* Copyright (c) 2000-2011 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -130,7 +130,7 @@ const struct rig_caps thd72a_caps = {
|
|||
{ 0, 999, RIG_MTYPE_MEM , {TH_CHANNEL_CAPS}}, /* TBC MEM */
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
|
||||
.rx_range_list1 = { RIG_FRNG_END, }, /* FIXME: enter region 1 setting */
|
||||
.tx_range_list1 = { RIG_FRNG_END, },
|
||||
.rx_range_list2 = {
|
||||
|
@ -309,10 +309,10 @@ int thd72_get_chan_all_cb (RIG * rig, chan_cb_t chan_cb, rig_ptr_t arg)
|
|||
|
||||
/* TODO: parse block and fill in chan */
|
||||
}
|
||||
|
||||
|
||||
/* notify the end? */
|
||||
chan_next = chan_next < chan_list[i].end ? chan_next+1 : chan_next;
|
||||
|
||||
|
||||
/*
|
||||
* provide application with channel data,
|
||||
* and ask for a new channel structure
|
||||
|
|
|
@ -8,19 +8,20 @@
|
|||
* Changed TH-F7E perameters to reflect TH-F6A
|
||||
* Changed RIG_ITU_REGION from 1 to 2
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TH-F7 description
|
||||
* Copyright (c) 2001-2009 by Stephane Fillod
|
||||
*
|
||||
* $Id: thf7.c,v 1.17 2009-02-03 23:22:58 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -58,12 +57,12 @@
|
|||
TH_CHANNEL_CAPS,\
|
||||
.flags=1, \
|
||||
.dcs_code=1, \
|
||||
.dcs_sql=1,
|
||||
.dcs_sql=1,
|
||||
|
||||
#define THF7_CHANNEL_CAPS_WO_LO \
|
||||
TH_CHANNEL_CAPS,\
|
||||
.dcs_code=1, \
|
||||
.dcs_sql=1,
|
||||
.dcs_sql=1,
|
||||
|
||||
/* CTCSS 01..42 */
|
||||
static const tone_t thf7_ctcss_list[] = {
|
||||
|
@ -156,7 +155,7 @@ const struct rig_caps thf7e_caps = {
|
|||
.chan_desc_sz = 8,
|
||||
|
||||
|
||||
.chan_list = {
|
||||
.chan_list = {
|
||||
{ 0, 399, RIG_MTYPE_MEM , {THF7_CHANNEL_CAPS}}, /* normal MEM */
|
||||
{ 400,409, RIG_MTYPE_EDGE, {THF7_CHANNEL_CAPS}}, /* L0-L9 lower scan limit */
|
||||
{ 410,419, RIG_MTYPE_EDGE, {THF7_CHANNEL_CAPS}}, /* U0-U9 upper scan limit */
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
* Copyright (c) 2003-2010 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -123,7 +123,7 @@ const struct rig_caps thg71_caps = {
|
|||
.chan_desc_sz = 6,
|
||||
|
||||
|
||||
.chan_list = {
|
||||
.chan_list = {
|
||||
{ 1, 199, RIG_MTYPE_MEM , {TH_CHANNEL_CAPS}}, /* normal MEM */
|
||||
{ 200,209, RIG_MTYPE_EDGE , {TH_CHANNEL_CAPS}}, /* L MEM */
|
||||
{ 210,219, RIG_MTYPE_EDGE , {TH_CHANNEL_CAPS}}, /* U MEM */
|
||||
|
@ -223,7 +223,7 @@ int thg71_decode_event (RIG *rig)
|
|||
if (rig->callbacks.freq_event) {
|
||||
rig->callbacks.freq_event(rig, RIG_VFO_A, freq, rig->callbacks.freq_arg);
|
||||
}
|
||||
/*
|
||||
/*
|
||||
if (rig->callbacks.mode_event) {
|
||||
rig->callbacks.mode_event(rig, RIG_VFO_A, mode, RIG_PASSBAND_NORMAL,
|
||||
rig->callbacks.mode_arg);
|
||||
|
@ -279,7 +279,7 @@ int thg71_decode_event (RIG *rig)
|
|||
case 0: bandmode = RIG_VFO_VFO; break;
|
||||
case 2: bandmode = RIG_VFO_MEM; break;
|
||||
/* case 3: bandmode = RIG_VFO_CALL; break; */
|
||||
default: bandmode = RIG_VFO_CURR; break;
|
||||
default: bandmode = RIG_VFO_CURR; break;
|
||||
}
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: Mode of Band event - %d\n", __func__, bandmode);
|
||||
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
* Copyright (c) 2000-2010 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -63,12 +63,12 @@
|
|||
TH_CHANNEL_CAPS,\
|
||||
.flags=1, \
|
||||
.dcs_code=1, \
|
||||
.dcs_sql=1,
|
||||
.dcs_sql=1,
|
||||
|
||||
#define TMD700_CHANNEL_CAPS_WO_LO \
|
||||
TH_CHANNEL_CAPS,\
|
||||
.dcs_code=1, \
|
||||
.dcs_sql=1,
|
||||
.dcs_sql=1,
|
||||
|
||||
/*
|
||||
* TODO: Band A & B
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
* Copyright (c) 2004-2010 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -137,7 +137,7 @@ const struct rig_caps tmv7_caps = {
|
|||
.chan_desc_sz = 6,
|
||||
|
||||
|
||||
.chan_list = {
|
||||
.chan_list = {
|
||||
{ 1, 90 , RIG_MTYPE_MEM , {TMV7_CHANNEL_CAPS}}, /* normal MEM VHF */
|
||||
{ 101, 190, RIG_MTYPE_MEM , {TMV7_CHANNEL_CAPS}}, /* normal MEM UHF */
|
||||
{ 201,206, RIG_MTYPE_EDGE , {TMV7_CHANNEL_CAPS}}, /* L MEM */
|
||||
|
@ -254,7 +254,7 @@ int tmv7_decode_event (RIG *rig)
|
|||
if (rig->callbacks.freq_event) {
|
||||
rig->callbacks.freq_event(rig, RIG_VFO_A, freq, rig->callbacks.freq_arg);
|
||||
}
|
||||
/*
|
||||
/*
|
||||
if (rig->callbacks.mode_event) {
|
||||
rig->callbacks.mode_event(rig, RIG_VFO_A, mode, RIG_PASSBAND_NORMAL,
|
||||
rig->callbacks.mode_arg);
|
||||
|
@ -310,7 +310,7 @@ int tmv7_decode_event (RIG *rig)
|
|||
case 0: bandmode = RIG_VFO_VFO; break;
|
||||
case 2: bandmode = RIG_VFO_MEM; break;
|
||||
/* case 3: bandmode = RIG_VFO_CALL; break; */
|
||||
default: bandmode = RIG_VFO_CURR; break;
|
||||
default: bandmode = RIG_VFO_CURR; break;
|
||||
}
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: Mode of Band event - %d\n", __func__, bandmode);
|
||||
|
||||
|
@ -553,7 +553,7 @@ int tmv7_set_channel(RIG *rig, const channel_t *chan)
|
|||
int retval;
|
||||
size_t ack_len;
|
||||
char req[64];
|
||||
long freq;
|
||||
long freq;
|
||||
int chn, step, shift, tone, ctcss, tonefq, ctcssfq;
|
||||
|
||||
chn=chan->channel_num;
|
||||
|
@ -576,7 +576,7 @@ int tmv7_set_channel(RIG *rig, const channel_t *chan)
|
|||
rig_debug(RIG_DEBUG_ERR, "%s: not supported shift\n", __func__);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
||||
|
||||
if(chan->ctcss_tone==0) {
|
||||
tone=0;tonefq=9;
|
||||
} else {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -15,10 +15,10 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* See the file 'COPYING.LIB' in the main Hamlib distribution directory for
|
||||
* the complete text of the GNU Lesser Public License version 2.
|
||||
* the complete text of the GNU Lesser Public License version 2.1.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TRC-80 description
|
||||
* Copyright (c) 2000-2009 by Stephane Fillod
|
||||
*
|
||||
* $Id: trc80.c,v 1.1 2009-01-29 22:54:40 fillods Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -114,12 +113,12 @@ const struct rig_caps trc80_caps = {
|
|||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(500),MHz(30),TRC80_ALL_MODES,-1,-1,TRC80_VFO},
|
||||
RIG_FRNG_END,
|
||||
}, /* rx range */
|
||||
|
||||
.tx_range_list1 = {
|
||||
.tx_range_list1 = {
|
||||
{MHz(1.8),MHz(30),TRC80_OTHER_TX_MODES,W(15),W(100),TRC80_VFO,TRC80_ANTS},
|
||||
{MHz(1.8),MHz(30),TRC80_AM_TX_MODES,W(5),W(25),TRC80_VFO,TRC80_ANTS}, /* AM class */
|
||||
RIG_FRNG_END,
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS140 description
|
||||
* Copyright (c) 2000-2009 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts140.c,v 1.14 2009-02-20 14:19:27 fillods Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -121,7 +120,7 @@ const struct rig_caps ts140_caps = {
|
|||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(50),kHz(34999),TS140_ALL_MODES,-1,-1,TS140_VFO},
|
||||
RIG_FRNG_END,
|
||||
}, /* rx range */
|
||||
|
@ -138,7 +137,7 @@ const struct rig_caps ts140_caps = {
|
|||
.tx_range_list2 = {
|
||||
FRQ_RNG_HF(2,TS140_OTHER_TX_MODES,W(5),W(100),TS140_VFO,TS140_ANTS),
|
||||
FRQ_RNG_HF(2,TS140_AM_TX_MODES,W(2),W(40),TS140_VFO,TS140_ANTS),
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
}, /* tx range */
|
||||
.tuning_steps = { /* FIXME: Done */
|
||||
{TS140_ALL_MODES,10},
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS2000 description
|
||||
* Copyright (c) 2000-2008 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts2000.c,v 1.27 2009-02-03 23:22:58 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -295,7 +294,7 @@ int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
}
|
||||
|
||||
sscanf(lvlbuf+2, "%d", &lvl);
|
||||
if (lvl < 10) /* just checking for main receiver preamp setting */
|
||||
if (lvl < 10) /* just checking for main receiver preamp setting */
|
||||
val->i = 0;
|
||||
if (lvl > 9)
|
||||
val->i = rig->state.preamp[0];
|
||||
|
@ -313,13 +312,13 @@ int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
}
|
||||
|
||||
sscanf(lvlbuf+2, "%d", &lvl);
|
||||
|
||||
|
||||
if (lvl < 100) /* just checking main band attenuator */
|
||||
val->i = 0;
|
||||
if (lvl > 99)
|
||||
val->i = rig->state.attenuator[0]; /* Since the TS-2000 only has one step on the attenuator */
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_VOX:
|
||||
retval = kenwood_transaction (rig, "VD", 2, lvlbuf, &lvl_len);
|
||||
if (retval != RIG_OK)
|
||||
|
@ -332,7 +331,7 @@ int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
sscanf(lvlbuf+2, "%d", &lvl);
|
||||
val->i = lvl / 100;
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_AF:
|
||||
retval = kenwood_transaction (rig, "AG0", 3, lvlbuf, &lvl_len);
|
||||
if (retval != RIG_OK)
|
||||
|
@ -345,7 +344,7 @@ int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
sscanf(lvlbuf+2, "%d", &lvl);
|
||||
val->f = lvl / 255.0;
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_RF:
|
||||
retval = kenwood_transaction (rig, "RG", 2, lvlbuf, &lvl_len);
|
||||
if (retval != RIG_OK)
|
||||
|
@ -358,7 +357,7 @@ int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
sscanf(lvlbuf+2, "%d", &lvl);
|
||||
val->f = lvl / 255.0;
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_SQL:
|
||||
retval = kenwood_transaction (rig, "SQ0", 3, lvlbuf, &lvl_len);
|
||||
if (retval != RIG_OK)
|
||||
|
@ -384,7 +383,7 @@ int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
sscanf(lvlbuf+8, "%d", &lvl);
|
||||
val->i = 400 + (50 * lvl);
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_RFPOWER:
|
||||
retval = kenwood_transaction (rig, "PC", 2, lvlbuf, &lvl_len);
|
||||
if (retval != RIG_OK)
|
||||
|
@ -397,7 +396,7 @@ int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
sscanf(lvlbuf+3, "%d", &lvl);
|
||||
val->f = lvl / 100.0; /* FIXME: for 1.2GHZ need to divide by 10 */
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_MICGAIN:
|
||||
retval = kenwood_transaction (rig, "MG", 2, lvlbuf, &lvl_len);
|
||||
if (retval != RIG_OK)
|
||||
|
@ -410,7 +409,7 @@ int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
sscanf(lvlbuf+2, "%d", &lvl);
|
||||
val->f = lvl / 100.0;
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_KEYSPD:
|
||||
retval = kenwood_transaction (rig, "KS", 2, lvlbuf, &lvl_len);
|
||||
if (retval != RIG_OK)
|
||||
|
@ -441,8 +440,8 @@ int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
lvl = lvl / 1000;
|
||||
val->f = lvl / 100.0;
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
case RIG_LEVEL_AGC: /* FIX ME: ts2000 returns 0 -20 for AGC */
|
||||
ret = get_kenwood_level(rig, "GT", 2, &val->f);
|
||||
agclevel = 255.0 * val->f;
|
||||
|
@ -465,7 +464,7 @@ int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
sscanf(lvlbuf+2, "%d", &lvl);
|
||||
val->i = lvl / 100;
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_BALANCE:
|
||||
return -RIG_ENIMPL;
|
||||
break;
|
||||
|
@ -482,7 +481,7 @@ int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
sscanf(lvlbuf+2, "%d", &lvl);
|
||||
val->i = lvl / 10000;
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_VOXGAIN:
|
||||
retval = kenwood_transaction (rig, "VG", 2, lvlbuf, &lvl_len);
|
||||
if (retval != RIG_OK)
|
||||
|
@ -499,7 +498,7 @@ int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
case RIG_LEVEL_ANTIVOX:
|
||||
return -RIG_ENIMPL;
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_RAWSTR:
|
||||
case RIG_LEVEL_STRENGTH:
|
||||
retval = kenwood_transaction (rig, "SM0", 3, lvlbuf, &lvl_len);
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS2000 description
|
||||
* Copyright (c) 2000-2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts2k.c,v 1.8 2009-02-03 23:22:58 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -183,7 +182,7 @@ ts2k_transaction(RIG * rig, const char *cmdstr, int cmd_len,
|
|||
int retry_read = 0;
|
||||
char *errtxt;
|
||||
|
||||
#define MAX_RETRY_READ 5
|
||||
#define MAX_RETRY_READ 5
|
||||
|
||||
rs = &rig->state;
|
||||
rs->hold_decode = 1;
|
||||
|
@ -312,7 +311,7 @@ ts2k_transaction(RIG * rig, const char *cmdstr, int cmd_len,
|
|||
* Assumes rig!=NULL
|
||||
*
|
||||
* status: VFOA, VFOB, VFOC, Main, Sub,
|
||||
* MEMA, MEMC, CALLA, CALLC
|
||||
* MEMA, MEMC, CALLA, CALLC
|
||||
* VFO_AB, VFO_BA, ...
|
||||
* They all work! --Dale
|
||||
*/
|
||||
|
@ -471,7 +470,7 @@ int ts2k_set_vfo(RIG * rig, vfo_t vfo)
|
|||
retval = ts2k_sat_on(rig, vfo);
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
sat_on = 1;
|
||||
sat_on = 1;
|
||||
} else {
|
||||
rig_debug(RIG_DEBUG_ERR, __func__ \
|
||||
": VFO not changed, only PTT/CTRL\n");
|
||||
|
@ -527,13 +526,13 @@ int ts2k_sat_on(RIG *rig, vfo_t vfo)
|
|||
// FIXME: Add Sat Trace here!
|
||||
|
||||
// Trace REV
|
||||
if(vfo & RIG_CTRL_REV)
|
||||
ack[7] = '1'; // sat trace REV
|
||||
if(vfo & RIG_CTRL_REV)
|
||||
ack[7] = '1'; // sat trace REV
|
||||
else
|
||||
ack[7] = '0';
|
||||
|
||||
// CTRL to main or sub?
|
||||
if ((vfo & RIG_VFO_CTRL) && (vfo & RIG_CTRL_SUB))
|
||||
if ((vfo & RIG_VFO_CTRL) && (vfo & RIG_CTRL_SUB))
|
||||
ack[5] = '1'; // sat CTRL on sub
|
||||
else
|
||||
ack[5] = '0'; // sat CTRL on main
|
||||
|
@ -654,7 +653,7 @@ int ts2k_get_vfo(RIG * rig, vfo_t * vfo)
|
|||
*vfo = RIG_VFO_B;
|
||||
break;
|
||||
case '2':
|
||||
if (ctrl_ptt[3] == '0') // we use CTRL as Active Transceiver.
|
||||
if (ctrl_ptt[3] == '0') // we use CTRL as Active Transceiver.
|
||||
*vfo = RIG_VFO_MEM_A;
|
||||
else if (ctrl_ptt[3] == '1')
|
||||
*vfo = RIG_VFO_MEM_C;
|
||||
|
@ -677,7 +676,7 @@ int ts2k_get_vfo(RIG * rig, vfo_t * vfo)
|
|||
return -RIG_EPROTO;
|
||||
|
||||
} // end switch
|
||||
} else { // end rx == tx; start split checks.
|
||||
} else { // end rx == tx; start split checks.
|
||||
rig_debug(RIG_DEBUG_ERR, "ts2k_get_vfo: Split.\n");
|
||||
|
||||
if (r_vfo == '0' && vfobuf[2] == '1')
|
||||
|
@ -926,7 +925,7 @@ int ts2k_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
|||
dc = ts2k_get_ctrl(rig); // will get fixed
|
||||
// m = dc[2]; s = dc[3]; // set defaults
|
||||
|
||||
// FIXME: Just handles simple stuff RIG_VFO_CURR,VFOA,VFOB,VFOC; *may* work as intended.
|
||||
// FIXME: Just handles simple stuff RIG_VFO_CURR,VFOA,VFOB,VFOC; *may* work as intended.
|
||||
ctrl = '0'; // Assume Main
|
||||
if(vfo & RIG_CTRL_SUB) // Change only if sub (bitwise, not logical)
|
||||
ctrl = '1';
|
||||
|
@ -1042,7 +1041,7 @@ int ts2k_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
|||
return RIG_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* assumes f!=NULL
|
||||
*/
|
||||
static int
|
||||
|
@ -1266,7 +1265,7 @@ int ts2k_set_func(RIG * rig, vfo_t vfo, setting_t func, int status)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* assumes status!=NULL
|
||||
* works for any 'format 1' command
|
||||
*/
|
||||
|
@ -1818,7 +1817,7 @@ rig_model_t probe_ts2k(port_t * port)
|
|||
if (retval != RIG_OK)
|
||||
return RIG_MODEL_NONE;
|
||||
|
||||
/*
|
||||
/*
|
||||
* reply should be something like 'IDxxx;'
|
||||
*/
|
||||
if (id_len != 5 || id_len != 6) {
|
||||
|
@ -1852,7 +1851,7 @@ rig_model_t probe_ts2k(port_t * port)
|
|||
}
|
||||
}
|
||||
/*
|
||||
* not found in known table....
|
||||
* not found in known table....
|
||||
* update ts2k_id_list[]!
|
||||
*/
|
||||
rig_debug(RIG_DEBUG_WARN,
|
||||
|
@ -1969,7 +1968,7 @@ int int_n(char *tmp, char *src, const int cnt)
|
|||
* PTT __ __ CTRL '0' = main; '1' = sub
|
||||
* \ /
|
||||
* "dc00;" PTT && CTRL both on main
|
||||
* "dc01;" PTT on main; CTRL on sub
|
||||
* "dc01;" PTT on main; CTRL on sub
|
||||
* "dc10;" PTT on sub; CTRL both on main
|
||||
* "dc11;" PTT && CTRL both on sub
|
||||
*/
|
||||
|
@ -2008,7 +2007,7 @@ int ts2k_set_ctrl(RIG * rig, int ptt, int ctrl)
|
|||
buf = ts2k_get_ctrl(rig);
|
||||
if(buf==NULL) {
|
||||
rig_debug(RIG_DEBUG_VERBOSE, __func__ \
|
||||
": returned NULL!\n");
|
||||
": returned NULL!\n");
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
rig_debug(RIG_DEBUG_VERBOSE, __func__": curr='%s',"
|
||||
|
@ -2425,9 +2424,9 @@ int ts2k_get_channel(RIG * rig, channel_t *chan)
|
|||
// send request for both rx mem and tx mem
|
||||
for(i=0; i<2; i++) { // 0=rx; 1=tx
|
||||
|
||||
mrcmd_len = sprintf(mrcmd, "mr%01d%03u;", i, chan->channel_num);
|
||||
mrcmd_len = sprintf(mrcmd, "mr%01d%03u;", i, chan->channel_num);
|
||||
ack_len = 60; // must be reset inside loop!
|
||||
retval = ts2k_transaction(rig, mrcmd, mrcmd_len, ack, &ack_len);
|
||||
retval = ts2k_transaction(rig, mrcmd, mrcmd_len, ack, &ack_len);
|
||||
CHKERR(retval);
|
||||
|
||||
rig_debug(RIG_DEBUG_ERR, __func__": read \n\t'%s'\n", ack);
|
||||
|
@ -2467,7 +2466,7 @@ int ts2k_get_channel(RIG * rig, channel_t *chan)
|
|||
// chan->channel_num = ; // already set?
|
||||
|
||||
// The following may be used to indicate we're reading limits (290-299).
|
||||
// At any rate, it's currently unused.
|
||||
// At any rate, it's currently unused.
|
||||
chan->bank_num = 0; // I merge the two--do not use! --Dale
|
||||
|
||||
chan->lock = int_n(tmp, &mrtxt[0][18], 1);
|
||||
|
@ -2617,7 +2616,7 @@ int ts2k_set_channel(RIG * rig, const channel_t *chan)
|
|||
|
||||
// FIXME: now readback the string and make sure it worked!
|
||||
}
|
||||
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -2627,7 +2626,7 @@ int ts2k_set_channel(RIG * rig, const channel_t *chan)
|
|||
* (Taken from my revision of ts2k_set_vfo())
|
||||
*
|
||||
* status: VFOA, VFOB, VFOC, Main, Sub,
|
||||
* MEMA, MEMC, CALLA, CALLC
|
||||
* MEMA, MEMC, CALLA, CALLC
|
||||
* VFO_AB, VFO_BA, ...
|
||||
* They all work! --Dale
|
||||
*/
|
||||
|
@ -2779,8 +2778,8 @@ int ts2k_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
|
|||
retval = ts2k_set_vfo(rig, v); // already set?
|
||||
CHKERR(retval);
|
||||
break;
|
||||
|
||||
case RIG_VFO_CALL_A: //
|
||||
|
||||
case RIG_VFO_CALL_A: //
|
||||
case RIG_VFO_CALL_C:
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR, __func__": vfo 'defaulted'\n");
|
||||
|
@ -2793,7 +2792,7 @@ int ts2k_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
|
|||
|
||||
switch(scan) {
|
||||
|
||||
case RIG_SCAN_STOP:
|
||||
case RIG_SCAN_STOP:
|
||||
return ts2k_scan_off(rig);
|
||||
break;
|
||||
|
||||
|
@ -2869,7 +2868,7 @@ int ts2k_get_parm(RIG *rig, setting_t parm, value_t *val)
|
|||
case RIG_PARM_TIME:
|
||||
return -RIG_ENAVAIL;
|
||||
default:
|
||||
return -RIG_EINTERNAL;
|
||||
return -RIG_EINTERNAL;
|
||||
}
|
||||
acklen = 30;
|
||||
retval = ts2k_transaction(rig, cmd, cmdlen, ack, &acklen);
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib TS2000 backend - main header
|
||||
* Copyright (c) 2000-2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts2k.h,v 1.3 2002-06-30 10:17:03 dedmons Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -125,13 +124,13 @@ int ts2k_set_trn(RIG *rig, int trn);
|
|||
int ts2k_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch);
|
||||
int ts2k_scan_on(RIG *rig, char ch);
|
||||
int ts2k_scan_off(RIG *rig);
|
||||
int ts2k_get_channel(RIG *rig, channel_t *chan);
|
||||
int ts2k_set_channel(RIG *rig, const channel_t *chan);
|
||||
int ts2k_get_channel(RIG *rig, channel_t *chan);
|
||||
int ts2k_set_channel(RIG *rig, const channel_t *chan);
|
||||
char *ts2k_get_ctrl(RIG *rig);
|
||||
int ts2k_set_ctrl(RIG *rig, int ptt, int ctrl);
|
||||
int ts2k_vfo_ctrl(RIG *rig, vfo_t vfo);
|
||||
int ts2k_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *tone);
|
||||
int ts2k_set_dcs_code(RIG *rig, vfo_t vfo, tone_t tone);
|
||||
int ts2k_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *tone);
|
||||
int ts2k_set_dcs_code(RIG *rig, vfo_t vfo, tone_t tone);
|
||||
int ts2k_get_int(char *c, int i);
|
||||
int ts2k_sat_off(RIG *rig, vfo_t vfo);
|
||||
int ts2k_sat_on(RIG *rig, vfo_t vfo);
|
||||
|
@ -148,7 +147,7 @@ int ts2k_set_split(RIG *rig, vfo_t vfo, split_t split);
|
|||
int ts2k_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq);
|
||||
int ts2k_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq);
|
||||
int ts2k_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *txmode, pbwidth_t *txwidth);
|
||||
int ts2k_set_split_mode(RIG *rig, vfo_t vfo, rmode_t txmode, pbwidth_t txwidth);
|
||||
int ts2k_set_split_mode(RIG *rig, vfo_t vfo, rmode_t txmode, pbwidth_t txwidth);
|
||||
int ts2k_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts);
|
||||
int ts2k_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts);
|
||||
int ts2k_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *freq);
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS440 description
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts440.c,v 1.15 2009-01-28 23:30:58 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -86,7 +85,7 @@ const struct rig_caps ts440_caps = {
|
|||
.has_get_level = TS440_LEVEL_ALL,
|
||||
.has_set_level = RIG_LEVEL_SET(TS440_LEVEL_ALL),
|
||||
.has_get_parm = RIG_PARM_NONE,
|
||||
.has_set_parm = RIG_PARM_NONE,
|
||||
.has_set_parm = RIG_PARM_NONE,
|
||||
.level_gran = {},
|
||||
.parm_gran = {},
|
||||
.ctcss_list = NULL,
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS450S description
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts450s.c,v 1.30 2009-02-06 14:15:12 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS480 description
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod and Juergen Rinas
|
||||
*
|
||||
* $Id: ts480.c,v 1.12 2009-02-03 22:56:06 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -357,7 +356,7 @@ const struct rig_caps ts480_caps = {
|
|||
{TS480_ALL_MODES,MHz(1)},
|
||||
{TS480_ALL_MODES,0}, /* any tuning step */
|
||||
RIG_TS_END,
|
||||
},
|
||||
},
|
||||
/* mode/filter list, remember: order matters! */
|
||||
.filters = {
|
||||
{RIG_MODE_SSB, kHz(2.4)},
|
||||
|
@ -405,7 +404,7 @@ const struct rig_caps ts480_caps = {
|
|||
* my notes:
|
||||
* format with: indent --line-length 200 ts480.c
|
||||
*
|
||||
* for the TS480 the function NR and BC have tree state: NR0,1,2 and BC0,1,2
|
||||
* for the TS480 the function NR and BC have tree state: NR0,1,2 and BC0,1,2
|
||||
* this cannot be send through the on/off logic of set_function!
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS50 description
|
||||
* Copyright (c) 2002-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts50s.c,v 1.14 2009-01-28 23:30:58 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -99,7 +98,7 @@ const struct rig_caps ts50s_caps = {
|
|||
{ 90, 99, RIG_MTYPE_EDGE },
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(500),MHz(30),TS50_ALL_MODES,-1,-1,TS50_VFO},
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS570 description
|
||||
* Copyright (c) 2001-2005 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts570.c,v 1.42 2009-02-03 23:22:58 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -70,7 +69,7 @@ static int ts570_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
return -RIG_ERJCTED;
|
||||
}
|
||||
|
||||
switch (buf[2])
|
||||
switch (buf[2])
|
||||
{
|
||||
case MD_CW: *mode = RIG_MODE_CW; break;
|
||||
case MD_CWR: *mode = RIG_MODE_CWR; break;
|
||||
|
@ -87,13 +86,13 @@ static int ts570_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
return -RIG_EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Use FW (Filter Width) for CW and RTTY,
|
||||
/*
|
||||
* Use FW (Filter Width) for CW and RTTY,
|
||||
* SL (dsp Slope Low cut-off) for all the other modes.
|
||||
* This is how it works on the TS870S, which does not have SL/SH commands.
|
||||
* TODO: combine SL and SH to set/read bandwidth....
|
||||
*/
|
||||
switch (*mode)
|
||||
switch (*mode)
|
||||
{
|
||||
case RIG_MODE_CW:
|
||||
case RIG_MODE_CWR:
|
||||
|
@ -161,7 +160,7 @@ static int ts570_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
retval = kenwood_simple_cmd(rig, buf);
|
||||
if (retval != RIG_OK) return retval;
|
||||
|
||||
switch (mode)
|
||||
switch (mode)
|
||||
{
|
||||
case RIG_MODE_CW:
|
||||
case RIG_MODE_CWR:
|
||||
|
@ -194,7 +193,7 @@ int ts570_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
|
|||
{
|
||||
char fctbuf[6];
|
||||
|
||||
/* Filter unimplemented RIG_FUNC_TUNER and allow settings 0..2 for
|
||||
/* Filter unimplemented RIG_FUNC_TUNER and allow settings 0..2 for
|
||||
* RIG_FUNC_NR.
|
||||
* Send all other requests to kenwood_set_func()
|
||||
*/
|
||||
|
@ -208,7 +207,7 @@ int ts570_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
|
|||
case RIG_FUNC_TUNER:
|
||||
sprintf(fctbuf,"AC %c0", (0==status)?'0':'1');
|
||||
return kenwood_simple_cmd(rig, fctbuf);
|
||||
|
||||
|
||||
default:
|
||||
return kenwood_set_func(rig, vfo, func, status);
|
||||
}
|
||||
|
@ -228,7 +227,7 @@ int ts570_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
|
|||
int retval;
|
||||
|
||||
fct_len = 50;
|
||||
/* filter unimplemented RIG_FUNC_TUNER
|
||||
/* filter unimplemented RIG_FUNC_TUNER
|
||||
* and send all other requests to kenwood_get_func()
|
||||
*/
|
||||
switch (func) {
|
||||
|
@ -238,11 +237,11 @@ int ts570_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
|
|||
return retval;
|
||||
|
||||
if (fct_len != 4) {
|
||||
rig_debug(RIG_DEBUG_ERR,"kenwood_get_func: "
|
||||
rig_debug(RIG_DEBUG_ERR,"kenwood_get_func: "
|
||||
"wrong answer len=%d\n", fct_len);
|
||||
return -RIG_ERJCTED;
|
||||
}
|
||||
|
||||
|
||||
*status = atoi(&fctbuf[2]);
|
||||
break;
|
||||
|
||||
|
@ -252,7 +251,7 @@ int ts570_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
|
|||
return retval;
|
||||
|
||||
if (fct_len != 6) {
|
||||
rig_debug(RIG_DEBUG_ERR,"kenwood_get_func: "
|
||||
rig_debug(RIG_DEBUG_ERR,"kenwood_get_func: "
|
||||
"wrong answer len=%d\n", fct_len);
|
||||
return -RIG_ERJCTED;
|
||||
}
|
||||
|
@ -300,10 +299,10 @@ ts570_set_level (RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
|||
|
||||
case RIG_LEVEL_RFPOWER:
|
||||
/* level for TS570D is from 0.. 100W in SSB and CW */
|
||||
kenwood_val = val.f * 100;
|
||||
kenwood_val = val.f * 100;
|
||||
sprintf (levelbuf, "PC%03d", kenwood_val);
|
||||
return kenwood_simple_cmd(rig, levelbuf);
|
||||
|
||||
|
||||
case RIG_LEVEL_MICGAIN:
|
||||
/* level is from 0..100 */
|
||||
kenwood_val = val.f * 100;
|
||||
|
@ -313,7 +312,7 @@ ts570_set_level (RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
|||
default:
|
||||
return kenwood_set_level (rig, vfo, level, val);
|
||||
}
|
||||
|
||||
|
||||
return RIG_OK; /* never reached */
|
||||
}
|
||||
|
||||
|
@ -387,7 +386,7 @@ ts570_get_level (RIG * rig, vfo_t vfo, setting_t level, value_t * val)
|
|||
default:
|
||||
return kenwood_get_level (rig, vfo, level, val);
|
||||
}
|
||||
|
||||
|
||||
return RIG_OK; /* never reached */
|
||||
}
|
||||
|
||||
|
@ -403,12 +402,12 @@ int ts570_get_split_vfo(RIG * rig, vfo_t vfo, split_t * split, vfo_t * tx_vfo)
|
|||
int retval;
|
||||
|
||||
retval = kenwood_transaction(rig, "FR", 2, ack, &acklen);
|
||||
if (retval != RIG_OK)
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
||||
|
||||
retval = kenwood_transaction(rig, "FT", 2, ack2, &ack2len);
|
||||
if (retval != RIG_OK)
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
||||
if (ack[2] != ack2[2]) {
|
||||
|
@ -447,7 +446,7 @@ int ts570_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
|
|||
case RIG_VFO_A: vfo_function = '0'; break;
|
||||
case RIG_VFO_B: vfo_function = '1'; break;
|
||||
case RIG_VFO_MEM: vfo_function = '2'; break;
|
||||
default:
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"ts570_set_split_vfo: unsupported VFO %d\n",
|
||||
vfo);
|
||||
return -RIG_EINVAL;
|
||||
|
@ -465,10 +464,10 @@ int ts570_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
|
|||
case RIG_VFO_A: vfo_function = '0'; break;
|
||||
case RIG_VFO_B: vfo_function = '1'; break;
|
||||
case RIG_VFO_MEM: vfo_function = '2'; break;
|
||||
default:
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"ts570_set_split_vfo: unsupported VFO %d\n", txvfo);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
}
|
||||
/* set TX VFO */
|
||||
cmd_len = sprintf(cmdbuf, "FT%c%c", vfo_function, cmd_trm(rig));
|
||||
retval = kenwood_simple_cmd(rig, cmdbuf);
|
||||
|
@ -481,7 +480,7 @@ int ts570_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
|
|||
/* first ask for it */
|
||||
ack_len = 10;
|
||||
retval = kenwood_transaction(rig, "FR", 2, ackbuf, &ack_len);
|
||||
if (retval != RIG_OK)
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
/* and then set it to both vfo's */
|
||||
vfo_function = ackbuf[2];
|
||||
|
@ -703,7 +702,7 @@ const struct rig_caps ts570s_caps = {
|
|||
{ 90, 99, RIG_MTYPE_EDGE, TS570_MEM_CAP },
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(500),MHz(60),TS570_ALL_MODES,-1,-1,TS570_VFO,TS570_ANTS},
|
||||
RIG_FRNG_END,
|
||||
}, /* rx range */
|
||||
|
@ -881,7 +880,7 @@ const struct rig_caps ts570d_caps = {
|
|||
{ 90, 99, RIG_MTYPE_EDGE, TS570_MEM_CAP },
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(500),MHz(30),TS570_ALL_MODES,-1,-1,TS570_VFO,TS570_ANTS},
|
||||
RIG_FRNG_END,
|
||||
}, /* rx range */
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
* Copyright (c) 2010 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -174,7 +174,7 @@ const struct rig_caps ts590_caps = {
|
|||
{TS590_ALL_MODES,MHz(1)},
|
||||
{TS590_ALL_MODES,0}, /* any tuning step */
|
||||
RIG_TS_END,
|
||||
},
|
||||
},
|
||||
/* mode/filter list, remember: order matters! */
|
||||
.filters = {
|
||||
{RIG_MODE_SSB, kHz(2.2)},
|
||||
|
@ -233,7 +233,7 @@ const struct rig_caps ts590_caps = {
|
|||
|
||||
|
||||
/*
|
||||
* for the TS480 the function NR and BC have tree state: NR0,1,2 and BC0,1,2
|
||||
* for the TS480 the function NR and BC have tree state: NR0,1,2 and BC0,1,2
|
||||
* this cannot be send through the on/off logic of set_function!
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS680 description
|
||||
* Copyright (c) 2000-2008 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts680.c,v 1.13 2009-02-13 19:29:16 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -121,7 +120,7 @@ const struct rig_caps ts680s_caps = {
|
|||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(50),kHz(34999),TS680_ALL_MODES,-1,-1,TS680_VFO},
|
||||
{MHz(45),kHz(59999),TS680_ALL_MODES,-1,-1,TS680_VFO},
|
||||
RIG_FRNG_END,
|
||||
|
@ -144,7 +143,7 @@ const struct rig_caps ts680s_caps = {
|
|||
FRQ_RNG_HF(2,TS680_AM_TX_MODES,W(2),W(40),TS680_VFO,TS680_ANTS),
|
||||
FRQ_RNG_6m(2,TS680_OTHER_TX_MODES,W(1),W(10),TS680_VFO,TS680_ANTS),
|
||||
FRQ_RNG_6m(2,TS680_AM_TX_MODES,W(1),W(4),TS680_VFO,TS680_ANTS),
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
}, /* tx range */
|
||||
.tuning_steps = { /* FIXME: Done */
|
||||
{TS680_ALL_MODES,10},
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
* Copyright (c) 2000-2010 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -118,13 +118,13 @@ const struct rig_caps ts690s_caps = {
|
|||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(500),MHz(30),TS690_ALL_MODES,-1,-1,TS690_VFO},
|
||||
{MHz(50),MHz(54),TS690_ALL_MODES,-1,-1,TS690_VFO},
|
||||
RIG_FRNG_END,
|
||||
}, /* rx range */
|
||||
|
||||
.tx_range_list1 = {
|
||||
.tx_range_list1 = {
|
||||
FRQ_RNG_HF(1,TS690_OTHER_TX_MODES, W(5),W(100),TS690_VFO,TS690_ANTS),
|
||||
FRQ_RNG_HF(1,TS690_AM_TX_MODES, W(4),W(40),TS690_VFO,TS690_ANTS), /* AM class */
|
||||
FRQ_RNG_6m(1,TS690_OTHER_TX_MODES, W(2.5),W(50),TS690_VFO,TS690_ANTS),
|
||||
|
@ -172,7 +172,7 @@ const struct rig_caps ts690s_caps = {
|
|||
.set_xit = kenwood_set_xit,
|
||||
.get_xit = kenwood_get_xit,
|
||||
.set_mode = kenwood_set_mode,
|
||||
.get_mode = kenwood_get_mode_if,
|
||||
.get_mode = kenwood_get_mode_if,
|
||||
.set_vfo = kenwood_set_vfo,
|
||||
.get_vfo = kenwood_get_vfo_if,
|
||||
.set_split_vfo = kenwood_set_split_vfo,
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS-711 description
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts711.c,v 1.7 2009-01-28 23:30:59 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS-790 description
|
||||
* Copyright (c) 2000-2009 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts790.c,v 1.19 2009-02-20 10:33:32 fillods Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS-811 description
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts811.c,v 1.7 2009-01-28 23:30:59 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS850 description
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts850.c,v 1.35 2009-02-20 12:22:19 fillods Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -113,14 +112,14 @@ const struct rig_caps ts850_caps = {
|
|||
.post_write_delay = 100,
|
||||
.timeout = 480000, // When you tune a Kenwood, the reply is delayed until you stop.
|
||||
.retry = 0,
|
||||
|
||||
|
||||
.has_get_func = TS850_FUNC_ALL,
|
||||
.has_set_func = TS850_FUNC_ALL,
|
||||
.has_get_level = TS850_LEVEL_GET,
|
||||
.has_set_level = TS850_LEVEL_SET,
|
||||
.has_get_parm = RIG_PARM_NONE,
|
||||
.has_set_parm = RIG_PARM_NONE,
|
||||
.level_gran = {},
|
||||
.level_gran = {},
|
||||
.parm_gran = {},
|
||||
.extparms = ts850_ext_parms,
|
||||
.ctcss_list = kenwood38_ctcss_list,
|
||||
|
@ -140,12 +139,12 @@ const struct rig_caps ts850_caps = {
|
|||
{ 90, 99, RIG_MTYPE_EDGE ,{TS850_CHANNEL_CAPS}},
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
.rx_range_list1 = {
|
||||
|
||||
.rx_range_list1 = {
|
||||
{kHz(100),MHz(30),TS850_ALL_MODES,-1,-1,TS850_VFO},
|
||||
RIG_FRNG_END,
|
||||
}, /* rx range */
|
||||
.tx_range_list1 = {
|
||||
.tx_range_list1 = {
|
||||
{kHz(1810),kHz(1850),TS850_OTHER_TX_MODES,W(5),W(100),TS850_VFO}, /* 100W class */
|
||||
{kHz(1810),kHz(1850),TS850_AM_TX_MODES,W(2),W(40),TS850_VFO}, /* 40W class */
|
||||
{kHz(3500),kHz(3800),TS850_OTHER_TX_MODES,W(5),W(100),TS850_VFO},
|
||||
|
@ -166,7 +165,7 @@ const struct rig_caps ts850_caps = {
|
|||
{MHz(28),kHz(29700),TS850_AM_TX_MODES,W(2),W(40),TS850_VFO},
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
|
||||
.rx_range_list2 = {
|
||||
{kHz(100),MHz(30),TS850_ALL_MODES,-1,-1,TS850_VFO},
|
||||
RIG_FRNG_END,
|
||||
|
@ -207,7 +206,7 @@ const struct rig_caps ts850_caps = {
|
|||
},
|
||||
.str_cal = TS850_STR_CAL,
|
||||
.priv = (void *)&ts850_priv_caps,
|
||||
|
||||
|
||||
.rig_init = kenwood_init,
|
||||
.rig_cleanup = kenwood_cleanup,
|
||||
.set_freq = kenwood_set_freq,
|
||||
|
@ -247,19 +246,19 @@ int ts850_set_rit(RIG * rig, vfo_t vfo, shortfreq_t rit)
|
|||
unsigned char c;
|
||||
int retval, len, i;
|
||||
size_t info_len;
|
||||
|
||||
|
||||
info_len = 0;
|
||||
if (rit == 0)
|
||||
kenwood_transaction(rig, "RT0", 3, infobuf, &info_len);
|
||||
else
|
||||
kenwood_transaction(rig, "RT1", 3, infobuf, &info_len);
|
||||
|
||||
|
||||
if (rit > 0)
|
||||
c = 'U';
|
||||
else
|
||||
c = 'D';
|
||||
len = sprintf(buf, "R%c", c);
|
||||
|
||||
|
||||
info_len = 0;
|
||||
retval = kenwood_transaction(rig, "RC", 2, infobuf, &info_len);
|
||||
for (i = 0; i < abs(rint(rit/20)); i++)
|
||||
|
@ -267,7 +266,7 @@ int ts850_set_rit(RIG * rig, vfo_t vfo, shortfreq_t rit)
|
|||
info_len = 0;
|
||||
retval = kenwood_transaction(rig, buf, len, infobuf, &info_len);
|
||||
}
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -277,13 +276,13 @@ int ts850_set_xit(RIG * rig, vfo_t vfo, shortfreq_t xit)
|
|||
unsigned char c;
|
||||
int retval, len, i;
|
||||
size_t info_len;
|
||||
|
||||
|
||||
info_len = 0;
|
||||
if (xit == 0)
|
||||
kenwood_transaction(rig, "XT0", 3, infobuf, &info_len);
|
||||
else
|
||||
kenwood_transaction(rig, "XT1", 3, infobuf, &info_len);
|
||||
|
||||
|
||||
info_len = 0;
|
||||
retval = kenwood_transaction(rig, "RC", 2, infobuf, &info_len);
|
||||
if (xit > 0)
|
||||
|
@ -291,13 +290,13 @@ int ts850_set_xit(RIG * rig, vfo_t vfo, shortfreq_t xit)
|
|||
else
|
||||
c = 'D';
|
||||
len = sprintf(buf, "R%c", c);
|
||||
|
||||
|
||||
for (i = 0; i < abs(rint(xit/20)); i++)
|
||||
{
|
||||
info_len = 0;
|
||||
retval = kenwood_transaction(rig, buf, len, infobuf, &info_len);
|
||||
}
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -323,10 +322,10 @@ int ts850_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
char lvlbuf[50];
|
||||
int i, retval;
|
||||
size_t lvl_len;
|
||||
|
||||
|
||||
if(vfo!=RIG_VFO_CURR)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
switch (level) {
|
||||
case RIG_LEVEL_RAWSTR:
|
||||
lvl_len = 50;
|
||||
|
@ -336,7 +335,7 @@ int ts850_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
lvlbuf[6]='\0';
|
||||
val->i=atoi(&lvlbuf[2]);
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_STRENGTH:
|
||||
lvl_len = 50;
|
||||
retval = kenwood_transaction (rig, "SM", 2, lvlbuf, &lvl_len);
|
||||
|
@ -347,7 +346,7 @@ int ts850_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
//val->i = (val->i * 4) - 54; Old approximate way of doing it.
|
||||
val->i = (int)rig_raw2val(val->i,&rig->caps->str_cal);
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_SWR:
|
||||
lvl_len = 0;
|
||||
retval = kenwood_transaction (rig, "RM1", 3, lvlbuf, &lvl_len);
|
||||
|
@ -359,12 +358,12 @@ int ts850_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
return retval;
|
||||
lvlbuf[7]='\0';
|
||||
i=atoi(&lvlbuf[3]);
|
||||
if(i == 30)
|
||||
if(i == 30)
|
||||
val->f = 150.0; /* infinity :-) */
|
||||
else
|
||||
val->f = 60.0/(30.0-(float)i)-1.0;
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_COMP:
|
||||
lvl_len = 0;
|
||||
retval = kenwood_transaction (rig, "RM2", 3, lvlbuf, &lvl_len);
|
||||
|
@ -377,7 +376,7 @@ int ts850_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
lvlbuf[7]='\0';
|
||||
val->f=(float)atoi(&lvlbuf[3])/30.0;
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_ALC:
|
||||
lvl_len = 0;
|
||||
retval = kenwood_transaction (rig, "RM3", 3, lvlbuf, &lvl_len);
|
||||
|
@ -390,7 +389,7 @@ int ts850_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
lvlbuf[7]='\0';
|
||||
val->f=(float)atoi(&lvlbuf[3])/30.0;
|
||||
break;
|
||||
|
||||
|
||||
case RIG_LEVEL_CWPITCH:
|
||||
lvl_len = 25;
|
||||
retval = kenwood_transaction (rig, "PT", 2, lvlbuf, &lvl_len);
|
||||
|
@ -400,8 +399,8 @@ int ts850_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
val->i=atoi(&lvlbuf[2]);
|
||||
val->i=(val->i-8)*50+800;
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
return kenwood_get_level (rig, vfo, level, val);
|
||||
}
|
||||
|
@ -415,7 +414,7 @@ int ts850_set_channel (RIG * rig, const channel_t * chan)
|
|||
size_t mem_len;
|
||||
int num,freq,tx_freq,tone;
|
||||
char mode,tx_mode,split,tones;
|
||||
|
||||
|
||||
num=chan->channel_num;
|
||||
freq=(int)chan->freq;
|
||||
mode=mode_to_char(chan->mode);
|
||||
|
@ -428,7 +427,7 @@ int ts850_set_channel (RIG * rig, const channel_t * chan)
|
|||
tx_mode='\0';
|
||||
split='0';
|
||||
}
|
||||
|
||||
|
||||
for (tone = 1; rig->caps->ctcss_list[tone-1] != 0 && tone<39; tone++) {
|
||||
if (rig->caps->ctcss_list[tone-1] == chan->ctcss_tone)
|
||||
break;
|
||||
|
@ -439,20 +438,20 @@ int ts850_set_channel (RIG * rig, const channel_t * chan)
|
|||
tones='0';
|
||||
tone=0;
|
||||
}
|
||||
|
||||
|
||||
cmd_len = sprintf(cmdbuf, "MW0 %02d%011d%c0%c%02d ",
|
||||
num,freq,mode,tones,tone);
|
||||
mem_len = 0;
|
||||
retval = kenwood_transaction (rig, cmdbuf, cmd_len, membuf, &mem_len);
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
||||
|
||||
cmd_len = sprintf(cmdbuf, "MW1 %02d%011d%c0%c%02d ",
|
||||
num,tx_freq,tx_mode,tones,tone);
|
||||
mem_len = 0;
|
||||
retval = kenwood_transaction (rig, cmdbuf, cmd_len, membuf, &mem_len);
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS870S description
|
||||
* Copyright (c) 2000-2008 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts870s.c,v 1.54 2009-02-03 23:22:58 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -58,7 +57,7 @@ static struct kenwood_priv_caps ts870s_priv_caps = {
|
|||
.cmdtrm = EOM_KEN,
|
||||
};
|
||||
|
||||
/* only the ts870s and ts2000 support get_vfo with the 'FR;' command
|
||||
/* only the ts870s and ts2000 support get_vfo with the 'FR;' command
|
||||
NOTE: using byte 31 in 'IF' will also work. TODO: check other rigs */
|
||||
static int ts870s_get_vfo(RIG *rig, vfo_t *vfo)
|
||||
{
|
||||
|
@ -84,7 +83,7 @@ static int ts870s_get_vfo(RIG *rig, vfo_t *vfo)
|
|||
case '0': *vfo = RIG_VFO_A; break;
|
||||
case '1': *vfo = RIG_VFO_B; break;
|
||||
case '2': *vfo = RIG_VFO_MEM; break;
|
||||
default:
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %c\n",
|
||||
__func__,vfobuf[2]);
|
||||
return -RIG_EPROTO;
|
||||
|
@ -110,7 +109,7 @@ static int ts870s_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
return -RIG_ERJCTED;
|
||||
}
|
||||
|
||||
switch (buf[2])
|
||||
switch (buf[2])
|
||||
{
|
||||
case MD_CW: *mode = RIG_MODE_CW; break;
|
||||
case MD_CWR: *mode = RIG_MODE_CWR; break;
|
||||
|
@ -138,7 +137,7 @@ static int ts870s_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
__func__,buf_len);
|
||||
return -RIG_ERJCTED;
|
||||
}
|
||||
|
||||
|
||||
*width = 10 * atoi(&buf[2]);
|
||||
|
||||
return RIG_OK;
|
||||
|
@ -149,7 +148,7 @@ static int ts870s_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
char buf[16];
|
||||
int kmode, retval;
|
||||
|
||||
switch (mode)
|
||||
switch (mode)
|
||||
{
|
||||
case RIG_MODE_CW: kmode = MD_CW; break;
|
||||
case RIG_MODE_CWR: kmode = MD_CWR; break;
|
||||
|
@ -169,8 +168,8 @@ static int ts870s_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
retval = kenwood_simple_cmd(rig, buf);
|
||||
if (retval != RIG_OK) return retval;
|
||||
|
||||
/*
|
||||
* This rig will simply use an IF bandpass which is closest to width,
|
||||
/*
|
||||
* This rig will simply use an IF bandpass which is closest to width,
|
||||
* so we don't need to check the value...
|
||||
*/
|
||||
sprintf(buf, "FW%04d", (int)width/10);
|
||||
|
@ -240,7 +239,7 @@ static int ts870s_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
|
||||
lvlbuf[7]='\0';
|
||||
i=atoi(&lvlbuf[3]);
|
||||
if(i == 30)
|
||||
if(i == 30)
|
||||
val->f = 150.0; /* infinity :-) */
|
||||
else
|
||||
val->f = 60.0/(30.0-(float)i)-1.0;
|
||||
|
@ -330,7 +329,7 @@ static int ts870s_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
sscanf (lvlbuf + 2, "%d", &lvl);
|
||||
val->f = lvl/100.;
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case RIG_LEVEL_AF:
|
||||
return get_kenwood_level(rig, "AG", 2, &val->f);
|
||||
|
@ -434,11 +433,11 @@ const struct rig_caps ts870s_caps = {
|
|||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(100),MHz(30),TS870S_ALL_MODES,-1,-1,TS870S_VFO,TS870S_ANTS},
|
||||
RIG_FRNG_END,
|
||||
}, /* rx range */
|
||||
.tx_range_list1 = {
|
||||
.tx_range_list1 = {
|
||||
FRQ_RNG_HF(1, TS870S_OTHER_TX_MODES, W(5), W(100), TS870S_VFO, TS870S_ANTS), /* 100W class */
|
||||
FRQ_RNG_HF(1, TS870S_AM_TX_MODES, W(2), W(25), TS870S_VFO, TS870S_ANTS), /* 25W class */
|
||||
RIG_FRNG_END,
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS930 description
|
||||
* Copyright (c) 2000-2003 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts930.c,v 1.5 2009-01-28 23:30:59 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -101,11 +100,11 @@ const struct rig_caps ts930_caps = {
|
|||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(150),MHz(30),TS930_ALL_MODES,-1,-1,TS930_VFO},
|
||||
RIG_FRNG_END,
|
||||
}, /* rx range */
|
||||
.tx_range_list1 = {
|
||||
.tx_range_list1 = {
|
||||
FRQ_RNG_HF(1,TS930_OTHER_TX_MODES, W(5),W(250),TS930_VFO,TS930_ANTS),
|
||||
FRQ_RNG_HF(1,TS930_AM_TX_MODES, W(4),W(80),TS930_VFO,TS930_ANTS), /* AM class */
|
||||
RIG_FRNG_END,
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS940 description
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts940.c,v 1.8 2009-01-28 23:30:59 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -107,12 +106,12 @@ const struct rig_caps ts940_caps = {
|
|||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(500),MHz(30),TS940_ALL_MODES,-1,-1,TS940_VFO},
|
||||
RIG_FRNG_END,
|
||||
}, /* rx range */
|
||||
|
||||
.tx_range_list1 = {
|
||||
.tx_range_list1 = {
|
||||
FRQ_RNG_HF(1,TS940_OTHER_TX_MODES, W(5),W(250),TS940_VFO,TS940_ANTS),
|
||||
FRQ_RNG_HF(1,TS940_AM_TX_MODES, W(4),W(140),TS940_VFO,TS940_ANTS), /* AM class */
|
||||
RIG_FRNG_END,
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
* Hamlib Kenwood backend - TS950 description
|
||||
* Copyright (c) 2002-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts950.c,v 1.16 2009-01-28 23:30:59 azummo Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue