kopia lustrzana https://github.com/Hamlib/Hamlib
Update LGPL header in Yaesu source files.
TNX to Lucian Laga, YO6PLB, for the notification.Hamlib-1.2.15
rodzic
7c905e92d3
commit
bff9f17f7e
|
@ -4,21 +4,20 @@
|
|||
* This shared library provides an API for communicating
|
||||
* via serial interface to an FRG-100 using the "CAT" interface
|
||||
*
|
||||
* $Id: frg100.c,v 1.5 2006-10-07 15:51:38 csete 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -123,11 +122,11 @@ const struct rig_caps frg100_caps = {
|
|||
.transceive = RIG_TRN_OFF,
|
||||
.bank_qty = 0,
|
||||
.chan_desc_sz = 0,
|
||||
.chan_list = {
|
||||
.chan_list = {
|
||||
{ 1, 0x32, RIG_MTYPE_MEM, FRG100_MEM_CAP },
|
||||
{ 0x33, 0x34, RIG_MTYPE_EDGE },
|
||||
},
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(50), MHz(30), FRG100_MODES, -1, -1, FRG100_VFOS, FRG100_ANTS },
|
||||
RIG_FRNG_END,
|
||||
}, /* Region 1 rx ranges */
|
||||
|
@ -176,12 +175,12 @@ const struct rig_caps frg100_caps = {
|
|||
|
||||
/*
|
||||
* frg100_open routine
|
||||
*
|
||||
*
|
||||
*/
|
||||
int frg100_open(RIG *rig)
|
||||
{
|
||||
unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x00, 0x0e};
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "frg100: frg100_open called\n");
|
||||
|
||||
/* send 0 delay pacing */
|
||||
|
@ -258,7 +257,7 @@ int frg100_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
{
|
||||
unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x00, 0xf7};
|
||||
int retval;
|
||||
|
||||
|
||||
if (level != RIG_LEVEL_RAWSTR)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
@ -273,7 +272,7 @@ int frg100_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
retval = read_block(&rig->state.rigport, (char *) cmd, 5);
|
||||
|
||||
if (retval < 1) {
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: read meter failed %d\n",
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: read meter failed %d\n",
|
||||
__FUNCTION__,retval);
|
||||
|
||||
return retval < 0 ? retval : -RIG_EIO;
|
||||
|
@ -298,7 +297,7 @@ int mode2rig(RIG *rig, rmode_t mode, pbwidth_t width)
|
|||
{
|
||||
int md;
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate mode from generic to frg100 specific
|
||||
*/
|
||||
switch(mode) {
|
||||
|
@ -318,7 +317,7 @@ int mode2rig(RIG *rig, rmode_t mode, pbwidth_t width)
|
|||
else
|
||||
md = MODE_FMW;
|
||||
break;
|
||||
case RIG_MODE_CW:
|
||||
case RIG_MODE_CW:
|
||||
if (width != RIG_PASSBAND_NORMAL ||
|
||||
width < rig_passband_normal(rig, mode))
|
||||
md = MODE_CWN;
|
||||
|
@ -335,8 +334,8 @@ int mode2rig(RIG *rig, rmode_t mode, pbwidth_t width)
|
|||
#if 0
|
||||
int rig2mode(RIG *rig, int md, rmode_t *mode, pbwidth_t *width)
|
||||
{
|
||||
/*
|
||||
* translate mode from frg100 specific to generic
|
||||
/*
|
||||
* translate mode from frg100 specific to generic
|
||||
*/
|
||||
switch(md) {
|
||||
case MODE_USB: *mode = RIG_MODE_USB; break;
|
||||
|
|
|
@ -4,21 +4,20 @@
|
|||
* This shared library provides an API for communicating
|
||||
* via serial interface to an FRG-8800 using the "CAT" interface
|
||||
*
|
||||
* $Id: frg8800.c,v 1.2 2006-10-07 15:51:38 csete 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -95,10 +94,10 @@ const struct rig_caps frg8800_caps = {
|
|||
.transceive = RIG_TRN_OFF,
|
||||
.bank_qty = 0,
|
||||
.chan_desc_sz = 0,
|
||||
.chan_list = {
|
||||
.chan_list = {
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(150), MHz(29.999), FRG8800_MODES, -1, -1, FRG8800_VFOS, FRG8800_ANTS },
|
||||
{MHz(118), MHz(173.999), FRG8800_MODES, -1, -1, FRG8800_VFOS, FRG8800_ANTS },
|
||||
RIG_FRNG_END,
|
||||
|
@ -154,12 +153,12 @@ const struct rig_caps frg8800_caps = {
|
|||
|
||||
/*
|
||||
* frg8800_open routine
|
||||
*
|
||||
*
|
||||
*/
|
||||
int frg8800_open(RIG *rig)
|
||||
{
|
||||
unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "frg8800: frg8800_open called\n");
|
||||
|
||||
/* send Ext Cntl ON: Activate CAT */
|
||||
|
@ -170,7 +169,7 @@ int frg8800_open(RIG *rig)
|
|||
int frg8800_close(RIG *rig)
|
||||
{
|
||||
unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x80, 0x00};
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "frg8800: frg8800_close called\n");
|
||||
|
||||
/* send Ext Cntl OFF: Deactivate CAT */
|
||||
|
@ -203,7 +202,7 @@ int frg8800_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
|
||||
rig_debug(RIG_DEBUG_TRACE,"frg8800: frg8800_set_mode called %x\n", mode);
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate mode from generic to frg8800 specific
|
||||
*/
|
||||
switch(mode) {
|
||||
|
|
|
@ -4,21 +4,20 @@
|
|||
* This shared library provides an API for communicating
|
||||
* via serial interface to an FRG-9600 using the "CAT" interface
|
||||
*
|
||||
* $Id: frg9600.c,v 1.2 2006-10-07 15:51:38 csete 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -90,10 +89,10 @@ const struct rig_caps frg9600_caps = {
|
|||
.transceive = RIG_TRN_OFF,
|
||||
.bank_qty = 0,
|
||||
.chan_desc_sz = 0,
|
||||
.chan_list = {
|
||||
.chan_list = {
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{MHz(60), MHz(905), RIG_MODE_AM|RIG_MODE_FM|RIG_MODE_WFM, -1, -1, FRG9600_VFOS },
|
||||
{MHz(60), MHz(460), RIG_MODE_SSB, -1, -1, FRG9600_VFOS },
|
||||
RIG_FRNG_END,
|
||||
|
@ -160,7 +159,7 @@ int frg9600_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
unsigned char md;
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate mode from generic to frg9600 specific
|
||||
*/
|
||||
switch(mode) {
|
||||
|
|
167
yaesu/ft100.c
167
yaesu/ft100.c
|
@ -8,20 +8,19 @@
|
|||
* The starting point for this code was Frank's ft847 implementation.
|
||||
*
|
||||
*
|
||||
* 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 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.
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -64,12 +63,12 @@ static int ft100_send_priv_cmd(RIG *rig, unsigned char ci);
|
|||
static const yaesu_cmd_set_t ncmd[] = {
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* lock on */
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* lock off */
|
||||
|
||||
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x01, 0x0f } }, /* ptt on */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x0f } }, /* ptt off */
|
||||
|
||||
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x0a } }, /* set freq */
|
||||
|
||||
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x0c } }, /* mode set main LSB */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x01, 0x0c } }, /* mode set main USB */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x02, 0x0c } }, /* mode set main CW */
|
||||
|
@ -78,7 +77,7 @@ static const yaesu_cmd_set_t ncmd[] = {
|
|||
{ 1, { 0x00, 0x00, 0x00, 0x06, 0x0c } }, /* mode set main FM */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x05, 0x0c } }, /* mode set main DIG */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x07, 0x0c } }, /* mode set main WFM */
|
||||
|
||||
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* clar on */
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* clar off */
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* set clar freq */
|
||||
|
@ -86,10 +85,10 @@ static const yaesu_cmd_set_t ncmd[] = {
|
|||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x05 } }, /* toggle vfo a/b */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x05 } }, /* select vfo a */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x01, 0x05 } }, /* select vfo b */
|
||||
|
||||
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x01, 0x01 } }, /* split on */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x01 } }, /* split off */
|
||||
|
||||
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x01, 0x84 } }, /* set RPT shift MINUS */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x02, 0x84 } }, /* set RPT shift PLUS */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x84 } }, /* set RPT shift SIMPLEX */
|
||||
|
@ -101,22 +100,22 @@ static const yaesu_cmd_set_t ncmd[] = {
|
|||
{ 1, { 0x00, 0x00, 0x00, 0x01, 0x92 } }, /* set CTCSS/DCS enc on */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x92 } }, /* set CTCSS/DCS off */
|
||||
/* em xif */
|
||||
|
||||
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x90 } }, /* set CTCSS tone */
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x91 } }, /* set DCS code */
|
||||
|
||||
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* get RX status */
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* get TX status */
|
||||
|
||||
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x10 } }, /* get FREQ and MODE status */
|
||||
|
||||
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* pwr wakeup sequence */
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* pwr on */
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* pwr off */
|
||||
|
||||
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x10 } }, /* read status block */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x00, 0xf7 } }, /* read meter block */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x01, 0xfa } } /* read flags block */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x01, 0xfa } } /* read flags block */
|
||||
};
|
||||
|
||||
|
||||
|
@ -170,9 +169,9 @@ static const tone_t ft100_dcs_list[] = {
|
|||
|
||||
const struct rig_caps ft100_caps = {
|
||||
.rig_model = RIG_MODEL_FT100,
|
||||
.model_name = "FT-100",
|
||||
.mfg_name = "Yaesu",
|
||||
.version = "0.4",
|
||||
.model_name = "FT-100",
|
||||
.mfg_name = "Yaesu",
|
||||
.version = "0.4",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_BETA,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
|
@ -184,13 +183,13 @@ const struct rig_caps ft100_caps = {
|
|||
.serial_data_bits = 8,
|
||||
.serial_stop_bits = 2,
|
||||
.serial_parity = RIG_PARITY_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.write_delay = FT100_WRITE_DELAY,
|
||||
.post_write_delay = FT100_POST_WRITE_DELAY,
|
||||
.timeout = 100,
|
||||
.retry = 0,
|
||||
.retry = 0,
|
||||
.has_get_func = RIG_FUNC_NONE,
|
||||
.has_set_func = FT100_FUNC_ALL,
|
||||
.has_set_func = FT100_FUNC_ALL,
|
||||
.has_get_level = FT100_GET_RIG_LEVELS,
|
||||
.has_set_level = RIG_LEVEL_NONE,
|
||||
.has_get_parm = RIG_PARM_NONE,
|
||||
|
@ -216,7 +215,7 @@ const struct rig_caps ft100_caps = {
|
|||
{MHz(76), MHz(108),RIG_MODE_WFM, -1,-1,FT100_VFO_ALL},
|
||||
{MHz(108),MHz(154),FT100_ALL_RX_MODES,-1,-1,FT100_VFO_ALL},
|
||||
{MHz(420),MHz(470),FT100_ALL_RX_MODES,-1,-1,FT100_VFO_ALL},
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
.tx_range_list1 = {
|
||||
FRQ_RNG_HF(1, FT100_OTHER_TX_MODES, W(0.5), W(100), FT100_VFO_ALL, FT100_ANT),
|
||||
|
@ -228,12 +227,12 @@ const struct rig_caps ft100_caps = {
|
|||
FRQ_RNG_70cm(1, FT100_OTHER_TX_MODES, W(0.5), W(20), FT100_VFO_ALL, FT100_ANT),
|
||||
FRQ_RNG_70cm(1, FT100_AM_TX_MODES, W(0.5), W(5), FT100_VFO_ALL, FT100_ANT),
|
||||
},
|
||||
.rx_range_list2 = {
|
||||
.rx_range_list2 = {
|
||||
{kHz(100),MHz(56), FT100_ALL_RX_MODES,-1,-1,FT100_VFO_ALL},
|
||||
{MHz(76), MHz(108),RIG_MODE_WFM, -1,-1,FT100_VFO_ALL},
|
||||
{MHz(108),MHz(154),FT100_ALL_RX_MODES,-1,-1,FT100_VFO_ALL},
|
||||
{MHz(420),MHz(470),FT100_ALL_RX_MODES,-1,-1,FT100_VFO_ALL},
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.tx_range_list2 = {
|
||||
|
@ -245,7 +244,7 @@ const struct rig_caps ft100_caps = {
|
|||
FRQ_RNG_2m(2, FT100_AM_TX_MODES, W(0.5), W(12.5), FT100_VFO_ALL, FT100_ANT),
|
||||
FRQ_RNG_70cm(2, FT100_OTHER_TX_MODES, W(0.5), W(20), FT100_VFO_ALL, FT100_ANT),
|
||||
FRQ_RNG_70cm(2, FT100_AM_TX_MODES, W(0.5), W(5), FT100_VFO_ALL, FT100_ANT),
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.tuning_steps = {
|
||||
|
@ -257,7 +256,7 @@ const struct rig_caps ft100_caps = {
|
|||
{RIG_MODE_WFM, kHz(5)},
|
||||
{RIG_MODE_WFM, kHz(50)},
|
||||
RIG_TS_END,
|
||||
},
|
||||
},
|
||||
|
||||
.filters = {
|
||||
{RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_RTTY, kHz(2.4)},
|
||||
|
@ -270,10 +269,10 @@ const struct rig_caps ft100_caps = {
|
|||
.str_cal = FT100_STR_CAL,
|
||||
|
||||
.priv = NULL,
|
||||
.rig_init = ft100_init,
|
||||
.rig_cleanup = ft100_cleanup,
|
||||
.rig_open = ft100_open,
|
||||
.rig_close = ft100_close,
|
||||
.rig_init = ft100_init,
|
||||
.rig_cleanup = ft100_cleanup,
|
||||
.rig_open = ft100_open,
|
||||
.rig_close = ft100_close,
|
||||
.set_freq = ft100_set_freq,
|
||||
.get_freq = ft100_get_freq,
|
||||
.set_mode = ft100_set_mode,
|
||||
|
@ -318,12 +317,12 @@ const struct rig_caps ft100_caps = {
|
|||
.get_func = NULL,
|
||||
.set_parm = NULL,
|
||||
.get_parm = NULL,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
int ft100_init(RIG *rig) {
|
||||
struct ft100_priv_data *priv;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __func__);
|
||||
|
||||
priv = (struct ft100_priv_data*)malloc(sizeof(struct ft100_priv_data));
|
||||
|
@ -332,20 +331,20 @@ int ft100_init(RIG *rig) {
|
|||
memset(priv, 0, sizeof(struct ft100_priv_data));
|
||||
|
||||
rig->state.priv = (void*)priv;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
int ft100_cleanup(RIG *rig) {
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
if (rig->state.priv)
|
||||
free(rig->state.priv);
|
||||
rig->state.priv = NULL;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft100:ft100_cleanup called \n");
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -370,18 +369,18 @@ int ft100_close(RIG *rig) {
|
|||
*/
|
||||
|
||||
static int ft100_send_priv_cmd(RIG *rig, unsigned char cmd_index) {
|
||||
|
||||
|
||||
struct rig_state *rig_s;
|
||||
struct ft100_priv_data *priv;
|
||||
unsigned char *cmd; /* points to sequence to send */
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"%s called (%d)\n", __func__, cmd_index);
|
||||
|
||||
|
||||
if (!rig) return -RIG_EINVAL;
|
||||
|
||||
priv = (struct ft100_priv_data*)rig->state.priv;
|
||||
rig_s = &rig->state;
|
||||
|
||||
|
||||
cmd = (unsigned char *) &ncmd[cmd_index].nseq; /* get native sequence */
|
||||
|
||||
return write_block(&rig_s->rigport, (char *) cmd, YAESU_CMD_LENGTH);
|
||||
|
@ -404,7 +403,7 @@ static int ft100_read_status(RIG *rig)
|
|||
|
||||
ret = read_block( &rig->state.rigport,
|
||||
(char*)&priv->status,
|
||||
sizeof(FT100_STATUS_INFO));
|
||||
sizeof(FT100_STATUS_INFO));
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"%s: read status=%i \n", __func__, ret);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
@ -427,7 +426,7 @@ static int ft100_read_flags(RIG *rig)
|
|||
|
||||
ret = read_block( &rig->state.rigport,
|
||||
(char*)&priv->flags,
|
||||
sizeof(FT100_FLAG_INFO));
|
||||
sizeof(FT100_FLAG_INFO));
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"%s: read flags=%i \n", __func__, ret);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
@ -461,16 +460,16 @@ int ft100_set_freq(RIG *rig, vfo_t vfo, freq_t freq) {
|
|||
}
|
||||
|
||||
int ft100_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) {
|
||||
|
||||
|
||||
struct ft100_priv_data *priv = (struct ft100_priv_data*)rig->state.priv;
|
||||
freq_t d1, d2;
|
||||
char freq_str[10];
|
||||
int ret;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft100: get_freq \n");
|
||||
|
||||
|
||||
if( !freq ) return -RIG_EINVAL;
|
||||
|
||||
|
||||
ret = ft100_read_status(rig);
|
||||
if (ret != RIG_OK)
|
||||
return ret;
|
||||
|
@ -480,24 +479,24 @@ int ft100_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) {
|
|||
(int)priv->status.freq[1],
|
||||
(int)priv->status.freq[2],
|
||||
(int)priv->status.freq[3]);
|
||||
|
||||
|
||||
/* now convert it .... */
|
||||
|
||||
|
||||
sprintf(freq_str, "%02X%02X%02X%02X",
|
||||
priv->status.freq[0],
|
||||
priv->status.freq[1],
|
||||
priv->status.freq[2],
|
||||
priv->status.freq[3]);
|
||||
|
||||
|
||||
d1=strtol(freq_str,NULL,16);
|
||||
d2=(d1*1.25); /* fixed 10Hz bug by OH2MMY */
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft100: d1=%"PRIfreq" d2=%"PRIfreq"\n",d1,d2);
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft100: get_freq= %8"PRIll" \n",(int64_t)d2);
|
||||
|
||||
|
||||
*freq = d2;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -581,7 +580,7 @@ int ft100_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) {
|
|||
|
||||
|
||||
|
||||
/* ft100_get_mode fixed by OH2MMY
|
||||
/* ft100_get_mode fixed by OH2MMY
|
||||
* Still answers wrong if on AM. Bug in rig's firmware?
|
||||
* The rig answers something weird then, not what the manual says
|
||||
* and the answer is different every time. Other modes do work.
|
||||
|
@ -593,7 +592,7 @@ int ft100_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) {
|
|||
int ret;
|
||||
|
||||
if( !mode || !width ) return -RIG_EINVAL;
|
||||
|
||||
|
||||
ret = ft100_read_status(rig);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
@ -613,7 +612,7 @@ int ft100_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) {
|
|||
break;
|
||||
case 0x04:
|
||||
*mode = RIG_MODE_AM;
|
||||
break;
|
||||
break;
|
||||
case 0x05:
|
||||
*mode = RIG_MODE_RTTY;
|
||||
break;
|
||||
|
@ -622,7 +621,7 @@ int ft100_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) {
|
|||
break;
|
||||
case 0x07:
|
||||
*mode = RIG_MODE_WFM;
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
*mode = RIG_MODE_NONE;
|
||||
};
|
||||
|
@ -649,7 +648,7 @@ int ft100_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) {
|
|||
|
||||
|
||||
|
||||
/* Function ft100_set_vfo fixed by OH2MMY
|
||||
/* Function ft100_set_vfo fixed by OH2MMY
|
||||
*/
|
||||
|
||||
int ft100_set_vfo(RIG *rig, vfo_t vfo) {
|
||||
|
@ -691,7 +690,7 @@ int ft100_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __func__);
|
||||
|
||||
if( !vfo ) return -RIG_EINVAL;
|
||||
|
||||
|
||||
ret = ft100_read_flags(rig);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
@ -732,7 +731,7 @@ int ft100_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) {
|
|||
int ret;
|
||||
|
||||
if( !ptt ) return -RIG_EINVAL;
|
||||
|
||||
|
||||
ret = ft100_read_flags(rig);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
@ -751,7 +750,7 @@ int ft100_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) {
|
|||
* Please test on real hardware and send report on hamlib mailing list
|
||||
*/
|
||||
int ft100_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) {
|
||||
|
||||
|
||||
int ret;
|
||||
float f;
|
||||
FT100_METER_INFO ft100_meter;
|
||||
|
@ -760,17 +759,17 @@ int ft100_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) {
|
|||
if( !val ) return -RIG_EINVAL;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"%s: %s\n", __func__, rig_strlevel(level));
|
||||
|
||||
|
||||
ret = ft100_send_priv_cmd(rig,FT100_NATIVE_CAT_READ_METERS);
|
||||
if (ret != RIG_OK)
|
||||
return ret;
|
||||
ret = read_block( &rig->state.rigport, (char*)&ft100_meter, sizeof(FT100_METER_INFO));
|
||||
ret = read_block( &rig->state.rigport, (char*)&ft100_meter, sizeof(FT100_METER_INFO));
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"%s: read meters=%d\n",__func__, ret);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
switch( level ) {
|
||||
|
||||
|
||||
case RIG_LEVEL_RAWSTR:
|
||||
val->i = ft100_meter.s_meter;
|
||||
break;
|
||||
|
@ -843,7 +842,7 @@ int ft100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) {
|
|||
default:
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
||||
|
||||
return ft100_send_priv_cmd(rig,cmd_index);
|
||||
}
|
||||
|
||||
|
@ -855,7 +854,7 @@ int ft100_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) {
|
|||
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __func__);
|
||||
|
||||
if( !split ) return -RIG_EINVAL;
|
||||
|
||||
|
||||
ret = ft100_read_flags(rig);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
@ -871,7 +870,7 @@ int ft100_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t shift) {
|
|||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft100:ft100_set_rptr_shift called \n");
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft100: + - 0 %3i %3i %3i %3i %c\n", RIG_RPT_SHIFT_PLUS, RIG_RPT_SHIFT_MINUS, RIG_RPT_SHIFT_NONE, shift, (char)shift);
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft100: + - 0 %3i %3i %3i %3i %c\n", RIG_RPT_SHIFT_PLUS, RIG_RPT_SHIFT_MINUS, RIG_RPT_SHIFT_NONE, shift, (char)shift);
|
||||
switch(shift) {
|
||||
case RIG_RPT_SHIFT_PLUS:
|
||||
cmd_index = FT100_NATIVE_CAT_SET_RPT_SHIFT_PLUS;
|
||||
|
@ -880,12 +879,12 @@ int ft100_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t shift) {
|
|||
cmd_index = FT100_NATIVE_CAT_SET_RPT_SHIFT_MINUS;
|
||||
break;
|
||||
case RIG_RPT_SHIFT_NONE:
|
||||
cmd_index = FT100_NATIVE_CAT_SET_RPT_SHIFT_SIMPLEX;
|
||||
cmd_index = FT100_NATIVE_CAT_SET_RPT_SHIFT_SIMPLEX;
|
||||
break;
|
||||
default:
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
||||
|
||||
return ft100_send_priv_cmd(rig,cmd_index);
|
||||
}
|
||||
|
||||
|
@ -913,13 +912,13 @@ int ft100_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code) {
|
|||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"%s = %03i, n=%d\n",
|
||||
__func__, code, pcode);
|
||||
|
||||
|
||||
cmd_index = FT100_NATIVE_CAT_SET_DCS_CODE;
|
||||
|
||||
memcpy(p_cmd,&ncmd[cmd_index].nseq,YAESU_CMD_LENGTH);
|
||||
|
||||
|
||||
p_cmd[3]=(char)pcode;
|
||||
|
||||
|
||||
return write_block(&rig_s->rigport, (char *) p_cmd, YAESU_CMD_LENGTH);
|
||||
}
|
||||
|
||||
|
@ -941,7 +940,7 @@ int ft100_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) {
|
|||
/* there are 39 ctcss tones available */
|
||||
if (ptone >= 39 || ft100_ctcss_list[ptone] == 0)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
rig_s = &rig->state;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"%s = %.1f Hz, n=%d\n",__func__,
|
||||
|
@ -950,9 +949,9 @@ int ft100_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) {
|
|||
cmd_index = FT100_NATIVE_CAT_SET_CTCSS_FREQ;
|
||||
|
||||
memcpy(p_cmd,&ncmd[cmd_index].nseq,YAESU_CMD_LENGTH);
|
||||
|
||||
|
||||
p_cmd[3]=(char)ptone;
|
||||
|
||||
|
||||
return write_block(&rig_s->rigport, (char *) p_cmd, YAESU_CMD_LENGTH);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,22 +8,19 @@
|
|||
* The starting point for this code was Frank's ft847 implementation.
|
||||
*
|
||||
*
|
||||
* $Id: ft100.h,v 1.9 2009-02-14 16:46:36 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -54,7 +51,7 @@ enum ft100_native_cmd_e {
|
|||
FT100_NATIVE_CAT_SET_CLAR_FREQ,
|
||||
FT100_NATIVE_CAT_SET_VFOAB,
|
||||
FT100_NATIVE_CAT_SET_VFOA,
|
||||
FT100_NATIVE_CAT_SET_VFOB,
|
||||
FT100_NATIVE_CAT_SET_VFOB,
|
||||
FT100_NATIVE_CAT_SPLIT_ON,
|
||||
FT100_NATIVE_CAT_SPLIT_OFF,
|
||||
FT100_NATIVE_CAT_SET_RPT_SHIFT_MINUS,
|
||||
|
@ -77,7 +74,7 @@ enum ft100_native_cmd_e {
|
|||
FT100_NATIVE_CAT_PWR_OFF,
|
||||
FT100_NATIVE_CAT_READ_STATUS,
|
||||
FT100_NATIVE_CAT_READ_METERS,
|
||||
FT100_NATIVE_CAT_READ_FLAGS,
|
||||
FT100_NATIVE_CAT_READ_FLAGS,
|
||||
FT100_NATIVE_SIZE /* end marker */
|
||||
};
|
||||
|
||||
|
@ -86,9 +83,9 @@ typedef enum ft100_native_cmd_e ft100_native_cmd_t;
|
|||
|
||||
/*
|
||||
* we are able to get way more info
|
||||
* than we can set
|
||||
*
|
||||
*/
|
||||
* than we can set
|
||||
*
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
unsigned char band_no;
|
||||
|
@ -109,7 +106,7 @@ typedef struct
|
|||
FT100_STATUS_INFO;
|
||||
|
||||
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
unsigned char mic_switch_1;
|
||||
unsigned char tx_fwd_power;
|
||||
|
@ -123,7 +120,7 @@ typedef struct
|
|||
}
|
||||
FT100_METER_INFO;
|
||||
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
unsigned char byte[8];
|
||||
}
|
||||
|
@ -168,7 +165,7 @@ static int ft100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
|
|||
static int ft100_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo);
|
||||
|
||||
static int ft100_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t shift);
|
||||
//static int ft100_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *shift);
|
||||
//static int ft100_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *shift);
|
||||
|
||||
static int ft100_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code);
|
||||
//static int ft100_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code);
|
||||
|
|
|
@ -7,22 +7,19 @@
|
|||
* via serial interface to an FT-1000D using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft1000d.c,v 1.2 2009-02-20 15:21:52 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -88,7 +85,7 @@
|
|||
*
|
||||
* If someone with an FT1000D can test and confirm hamlib working using the
|
||||
* existing FT990 support (-m 116) we perhaps could add support for this rig.
|
||||
* According to the documentation at hand, the protocol for the FT1000D is,
|
||||
* According to the documentation at hand, the protocol for the FT1000D is,
|
||||
* with the exception of dual VFO operation, identical to the FT990.
|
||||
*
|
||||
* Essentially the differences are:
|
||||
|
|
127
yaesu/ft1000mp.c
127
yaesu/ft1000mp.c
|
@ -4,21 +4,20 @@
|
|||
* This shared library provides an API for communicating
|
||||
* via serial interface to an FT-1000MP using the "CAT" interface
|
||||
*
|
||||
* $Id: ft1000mp.c,v 1.8 2008-01-10 12:12:47 n0nb 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -126,9 +125,9 @@ static const yaesu_cmd_set_t ncmd[] = {
|
|||
|
||||
#define FT1000MP_ALL_RX_MODES (RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_RTTY|RIG_MODE_AM|RIG_MODE_FM)
|
||||
|
||||
/*
|
||||
/*
|
||||
* TX caps
|
||||
*/
|
||||
*/
|
||||
|
||||
#define FT1000MP_OTHER_TX_MODES (RIG_MODE_CW| RIG_MODE_SSB|RIG_MODE_RTTY|RIG_MODE_FM) /* 100 W class */
|
||||
#define FT1000MP_AM_TX_MODES (RIG_MODE_AM ) /* set 25W max */
|
||||
|
@ -146,11 +145,11 @@ static const yaesu_cmd_set_t ncmd[] = {
|
|||
* 33 CTCSS sub-audible tones
|
||||
*/
|
||||
static const tone_t ft1000mp_ctcss_list[] = {
|
||||
670, 719, 770, 825, 885,
|
||||
670, 719, 770, 825, 885,
|
||||
948, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273,
|
||||
1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1679,
|
||||
1738, 1799, 1862, 1928,
|
||||
2035, 2107, 2181, 2257, 2336, 2418, 2503,
|
||||
1738, 1799, 1862, 1928,
|
||||
2035, 2107, 2181, 2257, 2336, 2418, 2503,
|
||||
0,
|
||||
};
|
||||
|
||||
|
@ -242,13 +241,13 @@ const struct rig_caps ft1000mp_caps = {
|
|||
.transceive = RIG_TRN_OFF,
|
||||
.bank_qty = 0,
|
||||
.chan_desc_sz = 0,
|
||||
.chan_list = {
|
||||
.chan_list = {
|
||||
{ 1, 99, RIG_MTYPE_MEM, FT1000MP_MEM_CAP },
|
||||
{ 100, 108, RIG_MTYPE_EDGE }, /* P1 .. P9 */
|
||||
{ 109, 113, RIG_MTYPE_MEMOPAD }, /* Q1 .. Q5 */
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(100), MHz(30), FT1000MP_ALL_RX_MODES, -1, -1, FT1000MP_VFOS, FT1000MP_ANTS }, /* General coverage + ham */
|
||||
RIG_FRNG_END,
|
||||
}, /* Region 1 rx ranges */
|
||||
|
@ -367,13 +366,13 @@ const struct rig_caps ft1000mpmkv_caps = {
|
|||
.transceive = RIG_TRN_OFF,
|
||||
.bank_qty = 0,
|
||||
.chan_desc_sz = 0,
|
||||
.chan_list = {
|
||||
.chan_list = {
|
||||
{ 1, 99, RIG_MTYPE_MEM, FT1000MP_MEM_CAP },
|
||||
{ 100, 108, RIG_MTYPE_EDGE }, /* P1 .. P9 */
|
||||
{ 109, 113, RIG_MTYPE_MEMOPAD }, /* Q1 .. Q5 */
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(100), MHz(30), FT1000MP_ALL_RX_MODES, -1, -1, FT1000MP_VFOS, FT1000MP_ANTS }, /* General coverage + ham */
|
||||
RIG_FRNG_END,
|
||||
}, /* Region 1 rx ranges */
|
||||
|
@ -492,13 +491,13 @@ const struct rig_caps ft1000mpmkvfld_caps = {
|
|||
.transceive = RIG_TRN_OFF,
|
||||
.bank_qty = 0,
|
||||
.chan_desc_sz = 0,
|
||||
.chan_list = {
|
||||
.chan_list = {
|
||||
{ 1, 99, RIG_MTYPE_MEM, FT1000MP_MEM_CAP },
|
||||
{ 100, 108, RIG_MTYPE_EDGE }, /* P1 .. P9 */
|
||||
{ 109, 113, RIG_MTYPE_MEMOPAD }, /* Q1 .. Q5 */
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(100), MHz(30), FT1000MP_ALL_RX_MODES, -1, -1, FT1000MP_VFOS, FT1000MP_ANTS }, /* General coverage + ham */
|
||||
RIG_FRNG_END,
|
||||
}, /* Region 1 rx ranges */
|
||||
|
@ -580,22 +579,22 @@ const struct rig_caps ft1000mpmkvfld_caps = {
|
|||
|
||||
|
||||
/*
|
||||
* _init
|
||||
* _init
|
||||
*
|
||||
*/
|
||||
|
||||
int ft1000mp_init(RIG *rig) {
|
||||
struct ft1000mp_priv_data *p;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,"ft1000mp: ft1000mp_init called \n");
|
||||
|
||||
|
||||
|
||||
p = (struct ft1000mp_priv_data*)malloc(sizeof(struct ft1000mp_priv_data));
|
||||
if (!p) /* whoops! memory shortage! */
|
||||
return -RIG_ENOMEM;
|
||||
|
||||
|
||||
/*
|
||||
* Copy native cmd set to private cmd storage area
|
||||
* Copy native cmd set to private cmd storage area
|
||||
*/
|
||||
memcpy(p->pcs,ncmd,sizeof(ncmd));
|
||||
|
||||
|
@ -605,7 +604,7 @@ int ft1000mp_init(RIG *rig) {
|
|||
p->current_vfo = RIG_VFO_A; /* default to VFO_A ? */
|
||||
|
||||
rig->state.priv = (void*)p;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -620,25 +619,25 @@ int ft1000mp_cleanup(RIG *rig) {
|
|||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "ft1000mp: ft1000mp_cleanup called\n");
|
||||
|
||||
|
||||
|
||||
if (rig->state.priv)
|
||||
free(rig->state.priv);
|
||||
rig->state.priv = NULL;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ft1000mp_open routine
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
int ft1000mp_open(RIG *rig) {
|
||||
struct rig_state *rig_s;
|
||||
struct ft1000mp_priv_data *p;
|
||||
unsigned char *cmd; /* points to sequence to send */
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "ft1000mp: ft1000mp_open called\n");
|
||||
|
||||
rig_s = &rig->state;
|
||||
|
@ -649,8 +648,8 @@ int ft1000mp_open(RIG *rig) {
|
|||
rig_debug(RIG_DEBUG_TRACE,"ft1000mp: rig_open: post_write_delay = %i msec \n",
|
||||
rig_s->rigport.post_write_delay);
|
||||
|
||||
/*
|
||||
* Copy native cmd PACING to private cmd storage area
|
||||
/*
|
||||
* Copy native cmd PACING to private cmd storage area
|
||||
*/
|
||||
memcpy(&p->p_cmd, &ncmd[FT1000MP_NATIVE_PACING].nseq, YAESU_CMD_LENGTH);
|
||||
p->p_cmd[3] = p->pacing; /* get pacing value, and store in private cmd */
|
||||
|
@ -699,8 +698,8 @@ int ft1000mp_set_freq(RIG *rig, vfo_t vfo, freq_t freq) {
|
|||
rig_debug(RIG_DEBUG_WARN,"ft1000mp: unknown VFO %d\n", vfo);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
/*
|
||||
* Copy native cmd freq_set to private cmd storage area
|
||||
/*
|
||||
* Copy native cmd freq_set to private cmd storage area
|
||||
*/
|
||||
memcpy(&p->p_cmd,&ncmd[cmd_index].nseq,YAESU_CMD_LENGTH);
|
||||
|
||||
|
@ -730,7 +729,7 @@ int ft1000mp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) {
|
|||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft1000mp: ft1000mp_get_freq called\n");
|
||||
|
||||
|
||||
|
||||
priv = (struct ft1000mp_priv_data*)rig->state.priv;
|
||||
|
||||
|
||||
|
@ -781,7 +780,7 @@ int ft1000mp_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width ) {
|
|||
|
||||
rig_debug(RIG_DEBUG_TRACE,"ft1000mp: generic mode = %x\n", mode);
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate mode from generic to ft1000mp specific
|
||||
*/
|
||||
switch(mode) {
|
||||
|
@ -816,13 +815,13 @@ int ft1000mp_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width ) {
|
|||
|
||||
/*
|
||||
* phew! now send cmd to rig
|
||||
*/
|
||||
*/
|
||||
ft1000mp_send_priv_cmd(rig,cmd_index);
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,"ft1000mp: cmd_index = %i\n", cmd_index);
|
||||
|
||||
return RIG_OK; /* good */
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -838,7 +837,7 @@ int ft1000mp_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) {
|
|||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft1000mp: ft1000mp_get_mode called\n");
|
||||
|
||||
|
||||
|
||||
priv = (struct ft1000mp_priv_data*)rig->state.priv;
|
||||
|
||||
if (vfo == RIG_VFO_A || vfo == RIG_VFO_B) {
|
||||
|
@ -862,13 +861,13 @@ int ft1000mp_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) {
|
|||
else
|
||||
mymode = priv->update_data[FT1000MP_SUMO_VFO_A_MODE]; /* CURR_VFO is VFOA offset */
|
||||
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,"ft1000mp: mymode = %x (before)\n", mymode);
|
||||
mymode &= MODE_MASK;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,"ft1000mp: mymode = %x (after)\n", mymode);
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate mode from ft1000mp to generic.
|
||||
* TODO: Add DATA, and Narrow modes. CW on LSB? -N0NB
|
||||
*/
|
||||
|
@ -894,9 +893,9 @@ int ft1000mp_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) {
|
|||
|
||||
default:
|
||||
return -RIG_EINVAL; /* sorry, wrong mode */
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,"ft1000mp: mode = %s\n", rig_strrmode(*mode));
|
||||
|
||||
/* TODO: set real IF filter selection */
|
||||
|
@ -919,15 +918,15 @@ int ft1000mp_set_vfo(RIG *rig, vfo_t vfo) {
|
|||
|
||||
rig_debug(RIG_DEBUG_TRACE,"ft1000mp: ft1000mp_set_vfo called %s\n", rig_strvfo(vfo));
|
||||
|
||||
|
||||
|
||||
p = (struct ft1000mp_priv_data*)rig->state.priv;
|
||||
rig_s = &rig->state;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
/*
|
||||
* RIG_VFO_VFO/RIG_VFO_MEM are not available
|
||||
* so try to emulate them.
|
||||
* looks like there's no RIG_VFO_MEM, maybe setting mem#
|
||||
* looks like there's no RIG_VFO_MEM, maybe setting mem#
|
||||
* switch to it automatically?
|
||||
*/
|
||||
|
||||
|
@ -953,10 +952,10 @@ int ft1000mp_set_vfo(RIG *rig, vfo_t vfo) {
|
|||
rig_debug(RIG_DEBUG_VERBOSE,"ft1000mp: Unknown default VFO %d\n", vfo);
|
||||
return -RIG_EINVAL; /* sorry, wrong VFO */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* phew! now send cmd to rig
|
||||
*/
|
||||
*/
|
||||
ft1000mp_send_priv_cmd(rig,cmd_index);
|
||||
|
||||
return RIG_OK;
|
||||
|
@ -976,7 +975,7 @@ int ft1000mp_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft1000mp: ft1000mp_get_vfo called\n");
|
||||
|
||||
|
||||
|
||||
p = (struct ft1000mp_priv_data*)rig->state.priv;
|
||||
|
||||
/* Get flags for VFO status */
|
||||
|
@ -991,7 +990,7 @@ int ft1000mp_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
*vfo = p->current_vfo = RIG_VFO_B;
|
||||
else
|
||||
*vfo = p->current_vfo = RIG_VFO_A;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,"ft1000mp: vfo status = %x %x\n", p->update_data[0], p->update_data[1]);
|
||||
|
||||
return RIG_OK;
|
||||
|
@ -1013,8 +1012,8 @@ int ft1000mp_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) {
|
|||
|
||||
rig_debug(RIG_DEBUG_TRACE,"ft1000mp: requested freq = %li Hz \n", rit);
|
||||
|
||||
/*
|
||||
* Copy native cmd freq_set to private cmd storage area
|
||||
/*
|
||||
* Copy native cmd freq_set to private cmd storage area
|
||||
*/
|
||||
memcpy(&priv->p_cmd,&ncmd[FT1000MP_NATIVE_RIT_ON].nseq,YAESU_CMD_LENGTH);
|
||||
|
||||
|
@ -1098,8 +1097,8 @@ int ft1000mp_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit) {
|
|||
|
||||
rig_debug(RIG_DEBUG_TRACE,"ft1000mp: requested freq = %li Hz \n", xit);
|
||||
|
||||
/*
|
||||
* Copy native cmd freq_set to private cmd storage area
|
||||
/*
|
||||
* Copy native cmd freq_set to private cmd storage area
|
||||
*/
|
||||
memcpy(&priv->p_cmd,&ncmd[FT1000MP_NATIVE_XIT_ON].nseq,YAESU_CMD_LENGTH);
|
||||
|
||||
|
@ -1247,8 +1246,8 @@ int ft1000mp_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) {
|
|||
unsigned char cmd_index; /* index of sequence to send */
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,"ft1000mp: ft1000mp_set_ptt called %d\n", ptt);
|
||||
|
||||
cmd_index = ptt ? FT1000MP_NATIVE_PTT_ON : FT1000MP_NATIVE_PTT_OFF;
|
||||
|
||||
cmd_index = ptt ? FT1000MP_NATIVE_PTT_ON : FT1000MP_NATIVE_PTT_OFF;
|
||||
|
||||
ft1000mp_send_priv_cmd(rig,cmd_index);
|
||||
|
||||
|
@ -1275,7 +1274,7 @@ static int ft1000mp_get_update_data(RIG *rig, unsigned char ci, unsigned char rl
|
|||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft1000mp: ft1000mp_get_update_data called\n");
|
||||
|
||||
|
||||
|
||||
p = (struct ft1000mp_priv_data*)rig->state.priv;
|
||||
rig_s = &rig->state;
|
||||
|
||||
|
@ -1301,14 +1300,14 @@ static int ft1000mp_send_priv_cmd(RIG *rig, unsigned char ci) {
|
|||
struct ft1000mp_priv_data *p;
|
||||
unsigned char *cmd; /* points to sequence to send */
|
||||
unsigned char cmd_index; /* index of sequence to send */
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft1000mp: ft1000mp_send_priv_cmd called\n");
|
||||
|
||||
|
||||
|
||||
p = (struct ft1000mp_priv_data*)rig->state.priv;
|
||||
rig_s = &rig->state;
|
||||
|
||||
|
||||
cmd_index = ci; /* get command */
|
||||
|
||||
if (! p->pcs[cmd_index].ncomp) {
|
||||
|
@ -1318,7 +1317,7 @@ static int ft1000mp_send_priv_cmd(RIG *rig, unsigned char ci) {
|
|||
|
||||
cmd = (unsigned char *) p->pcs[cmd_index].nseq; /* get native sequence */
|
||||
write_block(&rig_s->rigport, (char *) cmd, YAESU_CMD_LENGTH);
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
|
||||
}
|
||||
|
|
|
@ -5,22 +5,20 @@
|
|||
* via serial interface to an FT-1000MP using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft1000mp.h,v 1.2 2008-03-27 02:35:51 n0nb Exp $
|
||||
* 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 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 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
@ -49,7 +47,7 @@
|
|||
* 8N2 and 1 start bit = 11 bits at 4800 bps => effective byte rate = 1 byte in 2.2917 msec
|
||||
* => 28 bytes in 64 msec
|
||||
*
|
||||
* delay for 1 byte = 2.2917 + (pace_interval * 5)
|
||||
* delay for 1 byte = 2.2917 + (pace_interval * 5)
|
||||
*
|
||||
* pace_interval time to read 345 bytes
|
||||
* ------------ ----------------------
|
||||
|
@ -171,22 +169,22 @@ typedef enum ft1000mp_native_cmd_e ft1000mp_native_cmd_t;
|
|||
|
||||
|
||||
/*
|
||||
* Some useful offsets in the status update map (offset)
|
||||
* Some useful offsets in the status update map (offset)
|
||||
*
|
||||
*/
|
||||
|
||||
#define FT1000MP_SUMO_DISPLAYED_STATUS 0x00
|
||||
#define FT1000MP_SUMO_DISPLAYED_FREQ 0x01
|
||||
#define FT1000MP_SUMO_DISPLAYED_STATUS 0x00
|
||||
#define FT1000MP_SUMO_DISPLAYED_FREQ 0x01
|
||||
#define FT1000MP_SUMO_VFO_A_FREQ 0x01
|
||||
#define FT1000MP_SUMO_VFO_B_FREQ 0x11
|
||||
#define FT1000MP_SUMO_VFO_A_CLAR 0x05
|
||||
#define FT1000MP_SUMO_VFO_B_CLAR 0x15
|
||||
#define FT1000MP_SUMO_VFO_A_MODE 0x07
|
||||
#define FT1000MP_SUMO_VFO_B_MODE 0x17
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
* API local implementation
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -9,22 +9,19 @@
|
|||
* via serial interface to an FT-2000 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft2000.c,v 1.7 2009-01-11 17:39:26 mrtembry Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -8,22 +8,19 @@
|
|||
* via serial interface to an FT-2000 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft2000.h,v 1.3 2009-02-20 12:39:23 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -9,22 +9,19 @@
|
|||
* via serial interface to an FT-450 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft450.c,v 1.12 2009-01-11 17:39:26 mrtembry Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -8,22 +8,19 @@
|
|||
* via serial interface to an FT-450 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft450.h,v 1.4 2008-12-17 22:57:04 mrtembry Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -9,19 +9,19 @@
|
|||
* via serial interface to an FT-DX5000 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -8,20 +8,19 @@
|
|||
* via serial interface to an FT-DX5000 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* 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 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.
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
* via serial interface to an FT-736R using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -131,10 +131,10 @@ const struct rig_caps ft736_caps = {
|
|||
.transceive = RIG_TRN_OFF,
|
||||
.bank_qty = 0,
|
||||
.chan_desc_sz = 0,
|
||||
.chan_list = {
|
||||
.chan_list = {
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{MHz(50), MHz(53.99999), FT736_MODES, -1, -1, FT736_VFOS },
|
||||
{MHz(144), MHz(145.99999), FT736_MODES, -1, -1, FT736_VFOS },
|
||||
{MHz(430), MHz(439.99999), FT736_MODES, -1, -1, FT736_VFOS },
|
||||
|
@ -210,14 +210,14 @@ const struct rig_caps ft736_caps = {
|
|||
|
||||
/*
|
||||
* ft736_open routine
|
||||
*
|
||||
*
|
||||
*/
|
||||
int ft736_open(RIG *rig)
|
||||
{
|
||||
unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
struct ft736_priv_data *priv;
|
||||
int ret;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s called\n",__FUNCTION__);
|
||||
|
||||
priv = (struct ft736_priv_data*)malloc(sizeof(struct ft736_priv_data));
|
||||
|
@ -239,7 +239,7 @@ int ft736_open(RIG *rig)
|
|||
int ft736_close(RIG *rig)
|
||||
{
|
||||
unsigned char cmd[YAESU_CMD_LENGTH] = { 0x80, 0x80, 0x80, 0x80, 0x80};
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s called\n",__FUNCTION__);
|
||||
|
||||
free(rig->state.priv);
|
||||
|
@ -287,7 +287,7 @@ int ft736_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
if (priv->split == RIG_SPLIT_ON)
|
||||
cmd[4] = 0x17;
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate mode from generic to ft736 specific
|
||||
*/
|
||||
switch(mode) {
|
||||
|
@ -321,9 +321,9 @@ int ft736_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
|
|||
int ret;
|
||||
|
||||
/*
|
||||
* this can be misleading as Yaesu call it "Full duplex"
|
||||
* this can be misleading as Yaesu call it "Full duplex"
|
||||
* or "sat mode", and split Yaesu terms is repeater shift.
|
||||
*/
|
||||
*/
|
||||
cmd[4] = split == RIG_SPLIT_ON ? 0x0e : 0x8e;
|
||||
|
||||
ret = write_block(&rig->state.rigport, (char *) cmd, YAESU_CMD_LENGTH);
|
||||
|
@ -354,7 +354,7 @@ int ft736_set_split_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
unsigned char md;
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate mode from generic to ft736 specific
|
||||
*/
|
||||
switch(mode) {
|
||||
|
@ -408,7 +408,7 @@ int ft736_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
|
|||
retval = read_block(&rig->state.rigport, (char *) cmd, 5);
|
||||
|
||||
if (retval < 1) {
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: read squelch failed %d\n",
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: read squelch failed %d\n",
|
||||
__FUNCTION__,retval);
|
||||
|
||||
return retval < 0 ? retval : -RIG_EIO;
|
||||
|
@ -422,7 +422,7 @@ int ft736_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
{
|
||||
unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x00, 0xf7};
|
||||
int retval;
|
||||
|
||||
|
||||
if (level != RIG_LEVEL_RAWSTR)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
@ -437,7 +437,7 @@ int ft736_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
retval = read_block(&rig->state.rigport, (char *) cmd, 5);
|
||||
|
||||
if (retval < 1) {
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: read meter failed %d\n",
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: read meter failed %d\n",
|
||||
__FUNCTION__,retval);
|
||||
|
||||
return retval < 0 ? retval : -RIG_EIO;
|
||||
|
|
186
yaesu/ft747.c
186
yaesu/ft747.c
|
@ -8,19 +8,19 @@
|
|||
* box (FIF-232C) or similar
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -59,7 +59,7 @@ static int ft747_send_priv_cmd(RIG *rig, unsigned char ci);
|
|||
/* Incomplete sequences (0) must be completed with extra parameters */
|
||||
/* eg: mem number, or freq etc.. */
|
||||
|
||||
static const yaesu_cmd_set_t ft747_ncmd[] = {
|
||||
static const yaesu_cmd_set_t ft747_ncmd[] = {
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x01 } }, /* split = off */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x01, 0x01 } }, /* split = on */
|
||||
{ 0, { 0x00, 0x00, 0x00, 0x00, 0x02 } }, /* recall memory*/
|
||||
|
@ -93,8 +93,8 @@ static const yaesu_cmd_set_t ft747_ncmd[] = {
|
|||
|
||||
|
||||
|
||||
/*
|
||||
* Receiver caps
|
||||
/*
|
||||
* Receiver caps
|
||||
*/
|
||||
|
||||
|
||||
|
@ -104,9 +104,9 @@ static const yaesu_cmd_set_t ft747_ncmd[] = {
|
|||
#define FT747_FM_RX_MODES (RIG_MODE_FM)
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* TX caps
|
||||
*/
|
||||
*/
|
||||
|
||||
#define FT747_OTHER_TX_MODES (RIG_MODE_CW| RIG_MODE_USB| RIG_MODE_LSB ) /* 100 W class */
|
||||
#define FT747_AM_TX_MODES (RIG_MODE_AM ) /* set 25W max */
|
||||
|
@ -118,7 +118,7 @@ static const yaesu_cmd_set_t ft747_ncmd[] = {
|
|||
#define FT747_FUNC_ALL (RIG_FUNC_LOCK)
|
||||
|
||||
|
||||
#define FT747_VFOS (RIG_VFO_A|RIG_VFO_B)
|
||||
#define FT747_VFOS (RIG_VFO_A|RIG_VFO_B)
|
||||
|
||||
/*
|
||||
* FT747 channel caps.
|
||||
|
@ -160,13 +160,13 @@ struct ft747_priv_data {
|
|||
*/
|
||||
|
||||
const struct rig_caps ft747_caps = {
|
||||
.rig_model = RIG_MODEL_FT747,
|
||||
.model_name = "FT-747GX",
|
||||
.mfg_name = "Yaesu",
|
||||
.rig_model = RIG_MODEL_FT747,
|
||||
.model_name = "FT-747GX",
|
||||
.mfg_name = "Yaesu",
|
||||
.version = "0.4",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_BETA,
|
||||
.rig_type = RIG_TYPE_MOBILE,
|
||||
.rig_type = RIG_TYPE_MOBILE,
|
||||
.ptt_type = RIG_PTT_RIG,
|
||||
.dcd_type = RIG_DCD_NONE,
|
||||
.port_type = RIG_PORT_SERIAL,
|
||||
|
@ -206,53 +206,53 @@ const struct rig_caps ft747_caps = {
|
|||
|
||||
.tx_range_list1 = { RIG_FRNG_END, },
|
||||
|
||||
.rx_range_list2 = { { .start = kHz(100), .end = 29999900,
|
||||
.modes = FT747_ALL_RX_MODES,.low_power = -1,.high_power = -1, .vfo = FT747_VFOS},
|
||||
.rx_range_list2 = { { .start = kHz(100), .end = 29999900,
|
||||
.modes = FT747_ALL_RX_MODES,.low_power = -1,.high_power = -1, .vfo = FT747_VFOS},
|
||||
RIG_FRNG_END, }, /* rx range */
|
||||
|
||||
.tx_range_list2 = { {kHz(1500),1999900,FT747_OTHER_TX_MODES,.low_power = 5000,.high_power = 100000, .vfo = FT747_VFOS}, /* 100W class */
|
||||
.tx_range_list2 = { {kHz(1500),1999900,FT747_OTHER_TX_MODES,.low_power = 5000,.high_power = 100000, .vfo = FT747_VFOS}, /* 100W class */
|
||||
|
||||
{.start = kHz(1500),.end = 1999900,FT747_AM_TX_MODES,.low_power = 2000,.high_power = 25000, .vfo = FT747_VFOS}, /* 25W class */
|
||||
|
||||
|
||||
{.start = kHz(3500),3999900,FT747_OTHER_TX_MODES,5000,100000,FT747_VFOS},
|
||||
{.start = kHz(3500),3999900,FT747_AM_TX_MODES,2000,25000,FT747_VFOS},
|
||||
|
||||
|
||||
{.start = kHz(7000),7499900,FT747_OTHER_TX_MODES,5000,100000,FT747_VFOS},
|
||||
{.start = kHz(7000),7499900,FT747_AM_TX_MODES,2000,25000,FT747_VFOS},
|
||||
|
||||
|
||||
{.start = MHz(10),10499900,FT747_OTHER_TX_MODES,5000,100000,FT747_VFOS},
|
||||
{.start = MHz(10),10499900,FT747_AM_TX_MODES,2000,25000,FT747_VFOS},
|
||||
|
||||
|
||||
{.start = MHz(14),14499900,FT747_OTHER_TX_MODES,5000,100000,FT747_VFOS},
|
||||
{.start = MHz(14),14499900,FT747_AM_TX_MODES,2000,25000,FT747_VFOS},
|
||||
|
||||
|
||||
{.start = MHz(18),18499900,FT747_OTHER_TX_MODES,5000,100000,FT747_VFOS},
|
||||
{.start = MHz(18),18499900,FT747_AM_TX_MODES,2000,25000,FT747_VFOS},
|
||||
|
||||
|
||||
{.start = MHz(21),21499900,FT747_OTHER_TX_MODES,5000,100000,FT747_VFOS},
|
||||
{.start = MHz(21),21499900,FT747_AM_TX_MODES,2000,25000,FT747_VFOS},
|
||||
|
||||
|
||||
{.start = kHz(24500),24999900,FT747_OTHER_TX_MODES,5000,100000,FT747_VFOS},
|
||||
{.start = kHz(24500),24999900,FT747_AM_TX_MODES,2000,25000,FT747_VFOS},
|
||||
|
||||
|
||||
{.start = MHz(28),29999900,FT747_OTHER_TX_MODES,5000,100000,FT747_VFOS},
|
||||
{.start = MHz(28),29999900,FT747_AM_TX_MODES,2000,25000,FT747_VFOS},
|
||||
|
||||
|
||||
RIG_FRNG_END, },
|
||||
|
||||
|
||||
|
||||
|
||||
.tuning_steps = { {FT747_SSB_CW_RX_MODES,25}, /* fast off */
|
||||
{FT747_SSB_CW_RX_MODES,2500}, /* fast on */
|
||||
|
||||
|
||||
{FT747_AM_RX_MODES,kHz(1)}, /* fast off */
|
||||
{FT747_AM_RX_MODES,kHz(10)}, /* fast on */
|
||||
|
||||
|
||||
{FT747_FM_RX_MODES,kHz(5)}, /* fast off */
|
||||
{FT747_FM_RX_MODES,12500}, /* fast on */
|
||||
|
||||
|
||||
RIG_TS_END,
|
||||
},
|
||||
},
|
||||
|
||||
/* mode/filter list, .remember = order matters! */
|
||||
|
||||
|
@ -263,15 +263,15 @@ const struct rig_caps ft747_caps = {
|
|||
{RIG_MODE_AM, kHz(2.4)}, /* AM filter with narrow selection */
|
||||
{RIG_MODE_FM, kHz(19)}, /* FM wide filter, with optional FM unit. */
|
||||
{RIG_MODE_FM, kHz(8)}, /* FM with optional FM unit */
|
||||
|
||||
|
||||
RIG_FLT_END,
|
||||
},
|
||||
|
||||
|
||||
.priv = NULL, /* private data */
|
||||
|
||||
.rig_init = ft747_init,
|
||||
.rig_cleanup = ft747_cleanup,
|
||||
.rig_init = ft747_init,
|
||||
.rig_cleanup = ft747_cleanup,
|
||||
.rig_open = ft747_open, /* port opened */
|
||||
.rig_close = ft747_close, /* port closed */
|
||||
|
||||
|
@ -291,24 +291,24 @@ const struct rig_caps ft747_caps = {
|
|||
|
||||
|
||||
/*
|
||||
* _init
|
||||
* _init
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
int ft747_init(RIG *rig) {
|
||||
struct ft747_priv_data *p;
|
||||
|
||||
|
||||
p = (struct ft747_priv_data*)malloc(sizeof(struct ft747_priv_data));
|
||||
if (!p) /* whoops! memory shortage! */
|
||||
if (!p) /* whoops! memory shortage! */
|
||||
return -RIG_ENOMEM;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747:ft747_init called \n");
|
||||
|
||||
memset(p, 0, sizeof(struct ft747_priv_data));
|
||||
|
||||
rig->state.priv = (void*)p;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -319,40 +319,40 @@ int ft747_init(RIG *rig) {
|
|||
*/
|
||||
|
||||
int ft747_cleanup(RIG *rig) {
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "ft747: _cleanup called\n");
|
||||
|
||||
if (rig->state.priv)
|
||||
free(rig->state.priv);
|
||||
rig->state.priv = NULL;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* ft747_open routine
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
int ft747_open(RIG *rig) {
|
||||
struct rig_state *rig_s;
|
||||
struct ft747_priv_data *p;
|
||||
int ret;
|
||||
|
||||
|
||||
|
||||
|
||||
rig_s = &rig->state;
|
||||
p = (struct ft747_priv_data*)rig_s->priv;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747:rig_open: write_delay = %i msec \n",
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747:rig_open: write_delay = %i msec \n",
|
||||
rig_s->rigport.write_delay);
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747:rig_open: post_write_delay = %i msec \n",
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747:rig_open: post_write_delay = %i msec \n",
|
||||
rig_s->rigport.post_write_delay);
|
||||
|
||||
/*
|
||||
* Copy native cmd PACING to private cmd storage area
|
||||
/*
|
||||
* Copy native cmd PACING to private cmd storage area
|
||||
*/
|
||||
|
||||
memcpy(&p->p_cmd,&ft747_ncmd[FT_747_NATIVE_PACING].nseq,YAESU_CMD_LENGTH);
|
||||
memcpy(&p->p_cmd,&ft747_ncmd[FT_747_NATIVE_PACING].nseq,YAESU_CMD_LENGTH);
|
||||
p->p_cmd[3] = FT747_PACING_DEFAULT_VALUE; /* get pacing value, and store in private cmd */
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747: read pacing = %i \n",FT747_PACING_DEFAULT_VALUE);
|
||||
|
||||
|
@ -361,7 +361,7 @@ int ft747_open(RIG *rig) {
|
|||
ret = write_block(&rig_s->rigport, (char*)p->p_cmd, YAESU_CMD_LENGTH);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
rig_force_cache_timeout(&p->status_tv);
|
||||
|
||||
return RIG_OK;
|
||||
|
@ -370,7 +370,7 @@ int ft747_open(RIG *rig) {
|
|||
|
||||
/*
|
||||
* ft747_close routine
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
int ft747_close(RIG *rig) {
|
||||
|
@ -383,7 +383,7 @@ int ft747_close(RIG *rig) {
|
|||
|
||||
/*
|
||||
* Example of wrapping backend function inside frontend API
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
@ -398,11 +398,11 @@ int ft747_set_freq(RIG *rig, vfo_t vfo, freq_t freq) {
|
|||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747: requested freq = %"PRIfreq" Hz \n", freq);
|
||||
|
||||
/*
|
||||
* Copy native cmd freq_set to private cmd storage area
|
||||
/*
|
||||
* Copy native cmd freq_set to private cmd storage area
|
||||
*/
|
||||
|
||||
memcpy(&p->p_cmd,&ft747_ncmd[FT_747_NATIVE_FREQ_SET].nseq,YAESU_CMD_LENGTH);
|
||||
memcpy(&p->p_cmd,&ft747_ncmd[FT_747_NATIVE_FREQ_SET].nseq,YAESU_CMD_LENGTH);
|
||||
|
||||
/* store bcd format in p_cmd (LSB), round to nearest 25th Hz */
|
||||
to_bcd(p->p_cmd, (freq+12)/10, 8);
|
||||
|
@ -471,7 +471,7 @@ int ft747_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width ) {
|
|||
if (width == RIG_PASSBAND_NORMAL)
|
||||
width = width_normal;
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate mode from generic to ft747 specific
|
||||
*/
|
||||
|
||||
|
@ -512,7 +512,7 @@ int ft747_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width ) {
|
|||
|
||||
/*
|
||||
* phew! now send cmd to rig
|
||||
*/
|
||||
*/
|
||||
|
||||
return ft747_send_priv_cmd(rig,cmd_index);
|
||||
}
|
||||
|
@ -528,13 +528,13 @@ int ft747_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) {
|
|||
ret = ft747_get_update_data(rig); /* get whole shebang from rig */
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
mymode = p->update_data[FT747_SUMO_DISPLAYED_MODE];
|
||||
mymode &= MODE_MASK; /* mask out bits 5 and 6 */
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747: mymode = %x \n", mymode);
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate mode from ft747 to generic.
|
||||
*/
|
||||
|
||||
|
@ -557,14 +557,14 @@ int ft747_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) {
|
|||
|
||||
default:
|
||||
return -RIG_EPROTO; /* sorry, unknown mode */
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
if (mymode & MODE_NAR)
|
||||
*width = rig_passband_narrow(rig, *mode);
|
||||
else
|
||||
*width = rig_passband_normal(rig, *mode);
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -584,7 +584,7 @@ int ft747_set_vfo(RIG *rig, vfo_t vfo) {
|
|||
|
||||
p = (struct ft747_priv_data*)rig->state.priv;
|
||||
rig_s = &rig->state;
|
||||
|
||||
|
||||
switch(vfo) {
|
||||
|
||||
case RIG_VFO_VFO:
|
||||
|
@ -601,7 +601,7 @@ int ft747_set_vfo(RIG *rig, vfo_t vfo) {
|
|||
default:
|
||||
return -RIG_EINVAL; /* sorry, wrong VFO */
|
||||
}
|
||||
|
||||
|
||||
rig_force_cache_timeout(&p->status_tv);
|
||||
|
||||
return ft747_send_priv_cmd(rig,cmd_index);
|
||||
|
@ -618,20 +618,20 @@ int ft747_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
ret = ft747_get_update_data(rig); /* get whole shebang from rig */
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
status = p->update_data[FT747_SUMO_DISPLAYED_STATUS];
|
||||
status &= SF_VFOAB; /* check VFO bit*/
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747: vfo status = %x \n", status);
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate vfo status from ft747 to generic.
|
||||
*/
|
||||
|
||||
if (status) {
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747: VFO = B \n");
|
||||
(*vfo) = RIG_VFO_B;
|
||||
return RIG_OK;
|
||||
return RIG_OK;
|
||||
} else {
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747: VFO = A \n");
|
||||
(*vfo) = RIG_VFO_A;
|
||||
|
@ -644,7 +644,7 @@ int ft747_set_split(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) {
|
|||
unsigned char cmd_index; /* index of sequence to send */
|
||||
|
||||
cmd_index = split == RIG_SPLIT_ON ? FT_747_NATIVE_SPLIT_ON : FT_747_NATIVE_SPLIT_OFF;
|
||||
|
||||
|
||||
rig_force_cache_timeout(&((struct ft747_priv_data*)rig->state.priv)->status_tv);
|
||||
|
||||
return ft747_send_priv_cmd(rig,cmd_index);
|
||||
|
@ -661,7 +661,7 @@ int ft747_get_split(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) {
|
|||
ret = ft747_get_update_data(rig); /* get whole shebang from rig */
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
status = p->update_data[FT747_SUMO_DISPLAYED_STATUS];
|
||||
|
||||
if (((status & SF_VFOAB) && (status & SF_RXTX)) ||
|
||||
|
@ -670,7 +670,7 @@ int ft747_get_split(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) {
|
|||
else
|
||||
*tx_vfo = RIG_VFO_A;
|
||||
|
||||
return RIG_OK;
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -692,7 +692,7 @@ int ft747_set_ptt(RIG *rig,vfo_t vfo, ptt_t ptt) {
|
|||
|
||||
/*
|
||||
* phew! now send cmd to rig
|
||||
*/
|
||||
*/
|
||||
|
||||
return ft747_send_priv_cmd(rig,cmd_index);
|
||||
}
|
||||
|
@ -707,20 +707,20 @@ int ft747_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) {
|
|||
ret = ft747_get_update_data(rig); /* get whole shebang from rig */
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
status = p->update_data[FT747_SUMO_DISPLAYED_STATUS];
|
||||
status = status & SF_RXTX; /* check RXTX bit*/
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747: ptt status = %x \n", status);
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate mode from ft747 to generic.
|
||||
*/
|
||||
|
||||
if (status) {
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747: PTT = ON \n");
|
||||
(*ptt) = RIG_PTT_ON;
|
||||
return RIG_OK;
|
||||
return RIG_OK;
|
||||
} else {
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft747: PTT = OFF \n");
|
||||
(*ptt) = RIG_PTT_OFF;
|
||||
|
@ -737,10 +737,10 @@ int ft747_set_mem(RIG *rig, vfo_t vfo, int ch) {
|
|||
if (ch < 0 || ch > 0x13)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
/*
|
||||
* Copy native cmd freq_set to private cmd storage area
|
||||
/*
|
||||
* Copy native cmd freq_set to private cmd storage area
|
||||
*/
|
||||
memcpy(&p->p_cmd,&ft747_ncmd[FT_747_NATIVE_RECALL_MEM].nseq,YAESU_CMD_LENGTH);
|
||||
memcpy(&p->p_cmd,&ft747_ncmd[FT_747_NATIVE_RECALL_MEM].nseq,YAESU_CMD_LENGTH);
|
||||
|
||||
p->p_cmd[3] = ch;
|
||||
|
||||
|
@ -759,11 +759,11 @@ int ft747_get_mem(RIG *rig, vfo_t vfo, int *ch) {
|
|||
ret = ft747_get_update_data(rig); /* get whole shebang from rig */
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
mem_nb = p->update_data[FT747_SUMO_DISPLAYED_MEM];
|
||||
if (mem_nb > 0x13)
|
||||
return -RIG_EPROTO;
|
||||
|
||||
|
||||
*ch = mem_nb;
|
||||
|
||||
return RIG_OK;
|
||||
|
@ -798,8 +798,8 @@ static int ft747_get_update_data(RIG *rig) {
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = read_block(rigport, (char *) p->update_data,
|
||||
FT747_STATUS_UPDATE_DATA_LENGTH);
|
||||
ret = read_block(rigport, (char *) p->update_data,
|
||||
FT747_STATUS_UPDATE_DATA_LENGTH);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
@ -809,7 +809,7 @@ static int ft747_get_update_data(RIG *rig) {
|
|||
port_timeout = rigport->timeout;
|
||||
rigport->timeout = 100; /* ms */
|
||||
/* read sometimes-missing last byte (345th), but don't fail */
|
||||
read_block(rigport, &last_byte, 1);
|
||||
read_block(rigport, &last_byte, 1);
|
||||
rigport->timeout = port_timeout;
|
||||
|
||||
return RIG_OK;
|
||||
|
@ -827,11 +827,11 @@ static int ft747_send_priv_cmd(RIG *rig, unsigned char ci) {
|
|||
struct ft747_priv_data *p;
|
||||
unsigned char *cmd; /* points to sequence to send */
|
||||
unsigned char cmd_index; /* index of sequence to send */
|
||||
|
||||
|
||||
|
||||
p = (struct ft747_priv_data*)rig->state.priv;
|
||||
rig_s = &rig->state;
|
||||
|
||||
|
||||
cmd_index = ci; /* get command */
|
||||
|
||||
if (! ft747_ncmd[cmd_index].ncomp) {
|
||||
|
|
|
@ -8,22 +8,19 @@
|
|||
* box (FIF-232C) or similar (max232 + some capacitors :-)
|
||||
*
|
||||
*
|
||||
* $Id: ft747.h,v 1.5 2005-04-03 19:27:59 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -37,7 +34,7 @@
|
|||
*/
|
||||
#define FT747_STATUS_UPDATE_DATA_LENGTH 344
|
||||
|
||||
#define FT747_PACING_DEFAULT_VALUE 0
|
||||
#define FT747_PACING_DEFAULT_VALUE 0
|
||||
#define FT747_WRITE_DELAY 5 /* manual say 50 ms, but it doesn't work though */
|
||||
|
||||
|
||||
|
@ -50,12 +47,12 @@
|
|||
* 8N2 and 1 start bit = 11 bits at 4800 bps => effective byte rate = 1 byte in 2.2917 msec
|
||||
* => 345 bytes in 790 msec
|
||||
*
|
||||
* delay for 1 byte = 2.2917 + (pace_interval * 5)
|
||||
* delay for 1 byte = 2.2917 + (pace_interval * 5)
|
||||
*
|
||||
* pace_interval time to read 345 bytes
|
||||
* ------------ ----------------------
|
||||
*
|
||||
* 0 790 msec
|
||||
* 0 790 msec
|
||||
* 1 2515 msec
|
||||
* 2 4240 msec
|
||||
* 255 441 sec => 7 min 21 seconds
|
||||
|
@ -130,10 +127,10 @@ typedef enum ft747_native_cmd_e ft747_native_cmd_t;
|
|||
#define MODE_CWN 0x84
|
||||
#define MODE_USB 0x08
|
||||
#define MODE_LSB 0x10
|
||||
#define MODE_NAR 0x80
|
||||
#define MODE_NAR 0x80
|
||||
|
||||
/* All relevent bits */
|
||||
#define MODE_MASK 0x9f
|
||||
#define MODE_MASK 0x9f
|
||||
|
||||
|
||||
/*
|
||||
|
@ -159,23 +156,23 @@ typedef enum ft747_native_cmd_e ft747_native_cmd_t;
|
|||
|
||||
|
||||
/*
|
||||
* Some useful offsets in the status update map (offset)
|
||||
* Some useful offsets in the status update map (offset)
|
||||
*
|
||||
* Manual appears to be full of mistakes regarding offsets etc.. -- FS
|
||||
*
|
||||
*/
|
||||
|
||||
#define FT747_SUMO_DISPLAYED_MEM 0x17
|
||||
#define FT747_SUMO_DISPLAYED_MODE 0x18
|
||||
#define FT747_SUMO_DISPLAYED_STATUS 0x00
|
||||
#define FT747_SUMO_DISPLAYED_FREQ 0x01
|
||||
#define FT747_SUMO_DISPLAYED_MODE 0x18
|
||||
#define FT747_SUMO_DISPLAYED_STATUS 0x00
|
||||
#define FT747_SUMO_DISPLAYED_FREQ 0x01
|
||||
#define FT747_SUMO_VFO_A_FREQ 0x09
|
||||
#define FT747_SUMO_VFO_B_FREQ 0x11
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* API local implementation
|
||||
|
||||
/*
|
||||
* API local implementation
|
||||
*/
|
||||
|
||||
static int ft747_init(RIG *rig);
|
||||
|
|
|
@ -9,22 +9,19 @@
|
|||
* "CAT" interface box (FIF-232C) or similar.
|
||||
*
|
||||
*
|
||||
* $Id: ft757gx.c,v 1.13 2009-02-20 15:21:52 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -289,7 +286,7 @@ const struct rig_caps ft757gx2_caps = {
|
|||
|
||||
|
||||
/*
|
||||
* _init
|
||||
* _init
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -328,7 +325,7 @@ int ft757_cleanup(RIG *rig)
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
if (rig->state.priv)
|
||||
free(rig->state.priv);
|
||||
rig->state.priv = NULL;
|
||||
|
@ -338,7 +335,7 @@ int ft757_cleanup(RIG *rig)
|
|||
|
||||
/*
|
||||
* ft757_open routine
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
int ft757_open(RIG *rig)
|
||||
|
|
|
@ -7,22 +7,19 @@
|
|||
* box (FIF-232C) or similar (max232 + some capacitors :-)
|
||||
*
|
||||
*
|
||||
* $Id: ft757gx.h,v 1.4 2008-07-08 20:44:46 n0nb Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -81,15 +78,15 @@
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Receiver caps
|
||||
/*
|
||||
* Receiver caps
|
||||
*/
|
||||
#define FT757GX_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM)
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* TX caps
|
||||
*/
|
||||
*/
|
||||
#define FT757GX_ALL_TX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM)
|
||||
|
||||
|
||||
|
|
129
yaesu/ft767gx.c
129
yaesu/ft767gx.c
|
@ -8,22 +8,19 @@
|
|||
* box (FIF-232C) or similar
|
||||
*
|
||||
*
|
||||
* $Id:
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -205,17 +202,17 @@ static int rig2ctcss(RIG *rig, unsigned char tn, tone_t *tone);
|
|||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Receiver caps
|
||||
/*
|
||||
* Receiver caps
|
||||
*/
|
||||
|
||||
#define FT767GX_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_PKTFM)
|
||||
#define FT767GX_HF_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB)
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* TX caps
|
||||
*/
|
||||
*/
|
||||
|
||||
#define FT767GX_ALL_TX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_PKTFM)
|
||||
#define FT767GX_HF_TX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB)
|
||||
|
@ -251,13 +248,13 @@ const tone_t static_767gx_ctcss_list[] = {
|
|||
*/
|
||||
|
||||
const struct rig_caps ft767gx_caps = {
|
||||
.rig_model = RIG_MODEL_FT767,
|
||||
.model_name = "FT-767GX",
|
||||
.mfg_name = "Yaesu",
|
||||
.rig_model = RIG_MODEL_FT767,
|
||||
.model_name = "FT-767GX",
|
||||
.mfg_name = "Yaesu",
|
||||
.version = "0.2",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_BETA,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
.status = RIG_STATUS_BETA,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
.ptt_type = RIG_PTT_RIG,
|
||||
.dcd_type = RIG_DCD_NONE,
|
||||
.port_type = RIG_PORT_SERIAL,
|
||||
|
@ -295,37 +292,37 @@ const struct rig_caps ft767gx_caps = {
|
|||
|
||||
.tx_range_list1 = { RIG_FRNG_END, },
|
||||
|
||||
.rx_range_list2 = { { .start = kHz(100), .end = 29999999,
|
||||
.modes = FT767GX_ALL_RX_MODES,.low_power = -1,.high_power = -1},
|
||||
.rx_range_list2 = { { .start = kHz(100), .end = 29999999,
|
||||
.modes = FT767GX_ALL_RX_MODES,.low_power = -1,.high_power = -1},
|
||||
RIG_FRNG_END, }, /* rx range */
|
||||
|
||||
.tx_range_list2 = { {kHz(1500),1999900,FT767GX_HF_TX_MODES,.low_power = 5000,.high_power = 100000},
|
||||
|
||||
|
||||
{.start = kHz(3500),3999900,FT767GX_HF_TX_MODES,5000,100000},
|
||||
|
||||
|
||||
{.start = kHz(7000),7499900,FT767GX_HF_TX_MODES,5000,100000},
|
||||
|
||||
|
||||
{.start = MHz(10),10499900,FT767GX_HF_TX_MODES,5000,100000},
|
||||
|
||||
|
||||
{.start = MHz(14),14499900,FT767GX_HF_TX_MODES,5000,100000},
|
||||
|
||||
|
||||
{.start = MHz(18),18499900,FT767GX_HF_TX_MODES,5000,100000},
|
||||
|
||||
|
||||
{.start = MHz(21),21499900,FT767GX_HF_TX_MODES,5000,100000},
|
||||
|
||||
|
||||
{.start = kHz(24500),24999900,FT767GX_HF_TX_MODES,5000,100000},
|
||||
|
||||
|
||||
{.start = MHz(28),29999900,FT767GX_HF_TX_MODES,5000,100000},
|
||||
|
||||
|
||||
{.start = MHz(50),59999900,FT767GX_ALL_TX_MODES,5000,10000},
|
||||
|
||||
|
||||
{.start = MHz(144),147999900,FT767GX_ALL_TX_MODES,5000,10000},
|
||||
|
||||
|
||||
{.start = MHz(430),449999990,FT767GX_ALL_TX_MODES,5000,10000},
|
||||
|
||||
|
||||
RIG_FRNG_END, },
|
||||
|
||||
|
||||
|
||||
.tuning_steps = {
|
||||
{FT767GX_ALL_RX_MODES,10},
|
||||
{FT767GX_ALL_RX_MODES,100},
|
||||
|
@ -340,8 +337,8 @@ const struct rig_caps ft767gx_caps = {
|
|||
|
||||
.priv = NULL, /* private data */
|
||||
|
||||
.rig_init = ft767_init,
|
||||
.rig_cleanup = ft767_cleanup,
|
||||
.rig_init = ft767_init,
|
||||
.rig_cleanup = ft767_cleanup,
|
||||
.rig_open = ft767_open, /* port opened */
|
||||
.rig_close = ft767_close, /* port closed */
|
||||
|
||||
|
@ -369,21 +366,21 @@ const struct rig_caps ft767gx_caps = {
|
|||
};
|
||||
|
||||
/*
|
||||
* _init
|
||||
* _init
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
int ft767_init(RIG *rig) {
|
||||
struct ft767_priv_data *p;
|
||||
|
||||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
p = (struct ft767_priv_data*)malloc(sizeof(struct ft767_priv_data));
|
||||
if (!p) /* whoops! memory shortage! */
|
||||
if (!p) /* whoops! memory shortage! */
|
||||
return -RIG_ENOMEM;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,"%s called\n", __FUNCTION__);
|
||||
|
||||
/* TODO: read pacing from preferences */
|
||||
|
@ -397,7 +394,7 @@ int ft767_init(RIG *rig) {
|
|||
p->ack_cmd[3] = 00;
|
||||
p->ack_cmd[4] = 0x0B;
|
||||
rig->state.priv = (void*)p;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -410,26 +407,26 @@ int ft767_init(RIG *rig) {
|
|||
int ft767_cleanup(RIG *rig) {
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
|
||||
|
||||
if (rig->state.priv)
|
||||
free(rig->state.priv);
|
||||
rig->state.priv = NULL;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* ft767_open routine
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
int ft767_open(RIG *rig)
|
||||
{
|
||||
struct ft767_priv_data *priv = (struct ft767_priv_data*)rig->state.priv;
|
||||
int retval;
|
||||
|
||||
|
||||
serial_flush(&rig->state.rigport);
|
||||
|
||||
/* send 0 delay PACING cmd to rig */
|
||||
|
@ -452,7 +449,7 @@ int ft767_open(RIG *rig)
|
|||
|
||||
/*
|
||||
* ft767_close routine
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
int ft767_close(RIG *rig)
|
||||
|
@ -609,7 +606,7 @@ int ft767_set_vfo(RIG *rig, vfo_t vfo) {
|
|||
}
|
||||
|
||||
priv->current_vfo = vfo;
|
||||
|
||||
|
||||
retval = ft767_enter_CAT(rig);
|
||||
if (retval < 0) {
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __FUNCTION__, retval);
|
||||
|
@ -637,7 +634,7 @@ int ft767_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
retval = ft767_get_update_data(rig); /* get whole shebang from rig */
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
|
||||
|
||||
*vfo = rig2vfo(priv->update_data[STATUS_FLAGS]);
|
||||
|
||||
return RIG_OK;
|
||||
|
@ -651,7 +648,7 @@ int ft767_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
|
|||
retval = ft767_get_update_data(rig); /* get whole shebang from rig */
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
|
||||
|
||||
*ptt = priv->update_data[STATUS_FLAGS] & 0x01 ? RIG_PTT_ON : RIG_PTT_OFF;
|
||||
return RIG_OK;
|
||||
}
|
||||
|
@ -1033,7 +1030,7 @@ int ft767_set_split_vfo(RIG * rig, vfo_t vfo, split_t split, vfo_t tx_vfo) {
|
|||
default:
|
||||
return -RIG_EINVAL; /* sorry, wrong VFO */
|
||||
}
|
||||
|
||||
|
||||
serial_flush(&rig->state.rigport);
|
||||
|
||||
retval = ft767_enter_CAT(rig);
|
||||
|
@ -1045,7 +1042,7 @@ int ft767_set_split_vfo(RIG * rig, vfo_t vfo, split_t split, vfo_t tx_vfo) {
|
|||
/* See whether we need to toggle the split state */
|
||||
curr_split = priv->update_data[STATUS_FLAGS] & STATUS_MASK_SPLIT;
|
||||
if (curr_split) curr_split = RIG_SPLIT_ON;
|
||||
|
||||
|
||||
if (curr_split != split) {
|
||||
cmd[3] = SUBCMD_SPLIT;
|
||||
cmd[4] = CMD_MULTICMD;
|
||||
|
@ -1080,7 +1077,7 @@ int ft767_set_split_vfo(RIG * rig, vfo_t vfo, split_t split, vfo_t tx_vfo) {
|
|||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
retval = ft767_leave_CAT(rig);
|
||||
if (retval < 0) {
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __FUNCTION__, retval);
|
||||
|
@ -1245,7 +1242,7 @@ int ft767_send_block_and_ack(RIG *rig, unsigned char *cmd, size_t length)
|
|||
retval = read_block(&rig->state.rigport,
|
||||
(char *) cmd_echo_buf,
|
||||
YAESU_CMD_LENGTH);
|
||||
|
||||
|
||||
/* see if it matches the command we sent */
|
||||
if (memcmp(cmd_echo_buf, cmd, YAESU_CMD_LENGTH)) {
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: Command echo doesn't match\n",
|
||||
|
@ -1255,7 +1252,7 @@ int ft767_send_block_and_ack(RIG *rig, unsigned char *cmd, size_t length)
|
|||
|
||||
/* send the ACK */
|
||||
write_block(&rig->state.rigport, (char *) priv->ack_cmd, YAESU_CMD_LENGTH);
|
||||
|
||||
|
||||
/* read back the response (status bytes) */
|
||||
retval = read_block(&rig->state.rigport,
|
||||
(char *) priv->rx_data,
|
||||
|
@ -1290,7 +1287,7 @@ int ft767_get_update_data(RIG *rig)
|
|||
/* unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x01, CMD_CHECK}; */
|
||||
struct ft767_priv_data *priv = (struct ft767_priv_data*)rig->state.priv;
|
||||
int retval;
|
||||
|
||||
|
||||
serial_flush(&rig->state.rigport);
|
||||
|
||||
/* Entering CAT updates our data structures */
|
||||
|
@ -1317,7 +1314,7 @@ int ft767_set_split(RIG *rig, unsigned int split)
|
|||
struct ft767_priv_data *priv = (struct ft767_priv_data*)rig->state.priv;
|
||||
int retval;
|
||||
unsigned int curr_split;
|
||||
|
||||
|
||||
serial_flush(&rig->state.rigport);
|
||||
|
||||
/* Entering CAT updates our data structures */
|
||||
|
@ -1381,7 +1378,7 @@ int mode2rig(RIG *rig, rmode_t mode)
|
|||
{
|
||||
int md;
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate mode from generic to ft767 specific
|
||||
*/
|
||||
switch(mode) {
|
||||
|
@ -1399,8 +1396,8 @@ int mode2rig(RIG *rig, rmode_t mode)
|
|||
|
||||
int rig2mode(RIG *rig, int md, rmode_t *mode, pbwidth_t *width)
|
||||
{
|
||||
/*
|
||||
* translate mode from ft767 specific to generic
|
||||
/*
|
||||
* translate mode from ft767 specific to generic
|
||||
*/
|
||||
switch(md & 0x07) {
|
||||
case MODE_LSB: *mode = RIG_MODE_LSB; break;
|
||||
|
@ -1416,8 +1413,8 @@ int mode2rig(RIG *rig, rmode_t mode)
|
|||
}
|
||||
|
||||
int rig2ctcss(RIG *rig, unsigned char tn, tone_t *tone) {
|
||||
/*
|
||||
* translate tone from ft767 specific to generic
|
||||
/*
|
||||
* translate tone from ft767 specific to generic
|
||||
*/
|
||||
switch(tn) {
|
||||
#ifdef USE_YAESU_PUBLISHED_TONES
|
||||
|
|
|
@ -8,22 +8,19 @@
|
|||
* box (FIF-232C) or similar (max232 + some capacitors :-)
|
||||
*
|
||||
*
|
||||
* $Id:
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -33,8 +30,8 @@
|
|||
|
||||
#define FT767GX_STATUS_UPDATE_DATA_LENGTH 86
|
||||
|
||||
#define FT767GX_PACING_INTERVAL 5
|
||||
#define FT767GX_PACING_DEFAULT_VALUE 0
|
||||
#define FT767GX_PACING_INTERVAL 5
|
||||
#define FT767GX_PACING_DEFAULT_VALUE 0
|
||||
#define FT767GX_WRITE_DELAY 50
|
||||
|
||||
|
||||
|
|
|
@ -12,22 +12,19 @@
|
|||
* copied back and adopted for the FT-817.
|
||||
*
|
||||
*
|
||||
* $Id: ft817.c,v 1.18 2008-11-03 20:48:09 csete Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -167,11 +164,11 @@ const struct rig_caps ft817_caps = {
|
|||
.serial_data_bits = 8,
|
||||
.serial_stop_bits = 2,
|
||||
.serial_parity = RIG_PARITY_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.write_delay = FT817_WRITE_DELAY,
|
||||
.post_write_delay = FT817_POST_WRITE_DELAY,
|
||||
.timeout = FT817_TIMEOUT,
|
||||
.retry = 0,
|
||||
.retry = 0,
|
||||
.has_get_func = RIG_FUNC_NONE,
|
||||
.has_set_func = RIG_FUNC_LOCK | RIG_FUNC_TONE | RIG_FUNC_TSQL,
|
||||
.has_get_level = RIG_LEVEL_STRENGTH | RIG_LEVEL_RAWSTR | RIG_LEVEL_RFPOWER,
|
||||
|
@ -194,12 +191,12 @@ const struct rig_caps ft817_caps = {
|
|||
.chan_desc_sz = 0,
|
||||
.chan_list = { RIG_CHAN_END, },
|
||||
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(100),MHz(56), FT817_ALL_RX_MODES,-1,-1},
|
||||
{MHz(76), MHz(108),RIG_MODE_WFM, -1,-1},
|
||||
{MHz(118),MHz(164),FT817_ALL_RX_MODES,-1,-1},
|
||||
{MHz(420),MHz(470),FT817_ALL_RX_MODES,-1,-1},
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
.tx_range_list1 = {
|
||||
FRQ_RNG_HF(1, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS),
|
||||
|
@ -214,16 +211,16 @@ const struct rig_caps ft817_caps = {
|
|||
FRQ_RNG_70cm(1, FT817_OTHER_TX_MODES, W(0.5),W(5),FT817_VFO_ALL,FT817_ANTS),
|
||||
FRQ_RNG_70cm(1, FT817_AM_TX_MODES, W(0.5),W(1.5),FT817_VFO_ALL,FT817_ANTS),
|
||||
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
|
||||
.rx_range_list2 = {
|
||||
.rx_range_list2 = {
|
||||
{kHz(100),MHz(56), FT817_ALL_RX_MODES,-1,-1},
|
||||
{MHz(76), MHz(108),RIG_MODE_WFM, -1,-1},
|
||||
{MHz(118),MHz(164),FT817_ALL_RX_MODES,-1,-1},
|
||||
{MHz(420),MHz(470),FT817_ALL_RX_MODES,-1,-1},
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.tx_range_list2 = {
|
||||
|
@ -240,14 +237,14 @@ const struct rig_caps ft817_caps = {
|
|||
FRQ_RNG_70cm(2, FT817_OTHER_TX_MODES, W(0.5),W(5),FT817_VFO_ALL,FT817_ANTS),
|
||||
FRQ_RNG_70cm(2, FT817_AM_TX_MODES, W(0.5),W(1.5),FT817_VFO_ALL,FT817_ANTS),
|
||||
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.tuning_steps = {
|
||||
{FT817_SSB_CW_RX_MODES,Hz(10)},
|
||||
{FT817_AM_FM_RX_MODES|RIG_MODE_WFM,Hz(100)},
|
||||
RIG_TS_END,
|
||||
},
|
||||
},
|
||||
|
||||
.filters = {
|
||||
{FT817_SSB_CW_RX_MODES, kHz(2.2)}, /* normal passband */
|
||||
|
@ -259,12 +256,12 @@ const struct rig_caps ft817_caps = {
|
|||
},
|
||||
|
||||
.str_cal = FT817_STR_CAL,
|
||||
|
||||
|
||||
.priv = NULL,
|
||||
.rig_init = ft817_init,
|
||||
.rig_cleanup = ft817_cleanup,
|
||||
.rig_open = ft817_open,
|
||||
.rig_close = ft817_close,
|
||||
.rig_cleanup = ft817_cleanup,
|
||||
.rig_open = ft817_open,
|
||||
.rig_close = ft817_close,
|
||||
.set_freq = ft817_set_freq,
|
||||
.get_freq = ft817_get_freq,
|
||||
.set_mode = ft817_set_mode,
|
||||
|
@ -335,14 +332,14 @@ const struct rig_caps ft817_caps = {
|
|||
.set_channel = NULL,
|
||||
.get_channel = NULL,
|
||||
/* there are some more */
|
||||
};
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int ft817_init (RIG *rig)
|
||||
{
|
||||
struct ft817_priv_data *p;
|
||||
|
||||
|
||||
rig_debug (RIG_DEBUG_VERBOSE,"ft817: ft817_init called \n");
|
||||
|
||||
if ((p = calloc(1, sizeof(struct ft817_priv_data))) == NULL)
|
||||
|
@ -352,7 +349,7 @@ int ft817_init (RIG *rig)
|
|||
memcpy(p->pcs, ncmd, sizeof(ncmd));
|
||||
|
||||
rig->state.priv = (void*) p;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -363,7 +360,7 @@ int ft817_cleanup (RIG *rig)
|
|||
if (rig->state.priv)
|
||||
free(rig->state.priv);
|
||||
rig->state.priv = NULL;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -575,7 +572,7 @@ static int ft817_get_pometer_level(RIG *rig, value_t *val)
|
|||
if ((p->tx_status & 0x80) == 0) {
|
||||
/* the rig has 10 bars on its display */
|
||||
val->f = (p->tx_status & 0x0F) / 10.0;
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
val->f = 0.0;
|
||||
|
@ -598,7 +595,7 @@ static int ft817_get_smeter_level(RIG *rig, value_t *val)
|
|||
//n = (p->rx_status & 0x0F) - 9;
|
||||
|
||||
//val->i = n * ((n > 0) ? 10 : 6);
|
||||
|
||||
|
||||
/* S-meter value is returned in the lower 4 bits.
|
||||
0x00 = S0 (-54dB)
|
||||
0x01 = S1
|
||||
|
@ -609,7 +606,7 @@ static int ft817_get_smeter_level(RIG *rig, value_t *val)
|
|||
0x0B = S9+20 and so on
|
||||
*/
|
||||
n = (p->rx_status & 0x0F);
|
||||
|
||||
|
||||
if (n < 0x0A) {
|
||||
val->i = (6*n)-54;
|
||||
}
|
||||
|
@ -713,7 +710,7 @@ static int ft817_read_ack(RIG *rig)
|
|||
static int ft817_send_cmd(RIG *rig, int index)
|
||||
{
|
||||
struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv;
|
||||
|
||||
|
||||
if (p->pcs[index].ncomp == 0) {
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "ft817: Incomplete sequence\n");
|
||||
return -RIG_EINTERNAL;
|
||||
|
@ -730,7 +727,7 @@ static int ft817_send_icmd(RIG *rig, int index, unsigned char *data)
|
|||
{
|
||||
struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv;
|
||||
unsigned char cmd[YAESU_CMD_LENGTH];
|
||||
|
||||
|
||||
if (p->pcs[index].ncomp == 1) {
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "ft817: Complete sequence\n");
|
||||
return -RIG_EINTERNAL;
|
||||
|
|
|
@ -11,22 +11,19 @@
|
|||
* copied back and adopted for the FT-817.
|
||||
*
|
||||
*
|
||||
* $Id: ft817.h,v 1.6 2008-01-05 16:47:35 csete Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -126,7 +123,7 @@ struct ft817_priv_data {
|
|||
/* tx status */
|
||||
struct timeval tx_status_tv;
|
||||
unsigned char tx_status;
|
||||
|
||||
|
||||
/* freq & mode status */
|
||||
struct timeval fm_status_tv;
|
||||
unsigned char fm_status[YAESU_CMD_LENGTH];
|
||||
|
|
|
@ -9,22 +9,19 @@
|
|||
* via serial interface to an FT-840 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft840.c,v 1.1 2009-01-04 10:40:34 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -93,7 +90,7 @@
|
|||
#undef USE_FT840_GET_PTT
|
||||
#undef USE_FT840_SET_RIT
|
||||
|
||||
/*
|
||||
/*
|
||||
* API local implementation
|
||||
*
|
||||
*/
|
||||
|
@ -343,18 +340,18 @@ const struct rig_caps ft840_caps = {
|
|||
|
||||
static int ft840_init(RIG *rig) {
|
||||
struct ft840_priv_data *priv;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft840_priv_data *)malloc(sizeof(struct ft840_priv_data));
|
||||
if (!priv) /* whoops! memory shortage! */
|
||||
return -RIG_ENOMEM;
|
||||
|
||||
|
||||
/*
|
||||
* Copy native cmd set to private cmd storage area
|
||||
* Copy native cmd set to private cmd storage area
|
||||
*/
|
||||
memcpy(priv->pcs, ncmd, sizeof(ncmd));
|
||||
|
||||
|
@ -363,7 +360,7 @@ static int ft840_init(RIG *rig) {
|
|||
priv->read_update_delay = FT840_DEFAULT_READ_TIMEOUT; /* set update timeout to safe value */
|
||||
priv->current_vfo = RIG_VFO_MAIN; /* default to whatever */
|
||||
rig->state.priv = (void *)priv;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -381,25 +378,25 @@ static int ft840_cleanup(RIG *rig) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
if (rig->state.priv)
|
||||
free(rig->state.priv);
|
||||
rig->state.priv = NULL;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* rig_open
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
static int ft840_open(RIG *rig) {
|
||||
struct rig_state *rig_s;
|
||||
struct ft840_priv_data *priv;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
@ -426,7 +423,7 @@ static int ft840_open(RIG *rig) {
|
|||
|
||||
/*
|
||||
* rig_close
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
static int ft840_close(RIG *rig) {
|
||||
|
@ -503,7 +500,7 @@ static int ft840_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft840_priv_data *)rig->state.priv;
|
||||
|
||||
if (vfo == RIG_VFO_CURR) {
|
||||
|
@ -792,7 +789,7 @@ static int ft840_set_vfo(RIG *rig, vfo_t vfo) {
|
|||
return -RIG_EINVAL;
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = 0x%02x\n", __func__, vfo);
|
||||
|
||||
|
||||
priv = (struct ft840_priv_data *)rig->state.priv;
|
||||
|
||||
if (vfo == RIG_VFO_CURR) {
|
||||
|
@ -830,7 +827,7 @@ static int ft840_set_vfo(RIG *rig, vfo_t vfo) {
|
|||
}
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: set cmd_index = %i\n", __func__, cmd_index);
|
||||
|
||||
|
||||
err = ft840_send_static_cmd(rig, cmd_index);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
@ -858,7 +855,7 @@ static int ft840_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft840_priv_data *)rig->state.priv;
|
||||
|
||||
/* Get flags for VFO status */
|
||||
|
@ -866,7 +863,7 @@ static int ft840_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
FT840_STATUS_FLAGS_LENGTH);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
|
||||
status_0 = priv->update_data[FT840_SUMO_DISPLAYED_STATUS_0];
|
||||
stat_vfo = status_0 & SF_VFO_MASK; /* get VFO active bits */
|
||||
stat_mem = status_0 & SF_MEM_MASK; /* get MEM active bits */
|
||||
|
@ -878,7 +875,7 @@ static int ft840_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"%s: stat_mem = 0x%02x\n", __func__, stat_mem);
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate vfo and mem status from ft840 to generic.
|
||||
*
|
||||
* First a test is made on bits 6 and 7 of status_0. Bit 7 is set
|
||||
|
@ -1000,7 +997,7 @@ static int ft840_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft840_priv_data *)rig->state.priv;
|
||||
|
||||
/* Get flags for VFO status */
|
||||
|
@ -1008,7 +1005,7 @@ static int ft840_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) {
|
|||
FT840_STATUS_FLAGS_LENGTH);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
|
||||
status_2 = priv->update_data[FT840_SUMO_DISPLAYED_STATUS_2];
|
||||
stat_ptt = status_2 & SF_PTT_MASK; /* get PTT active bit */
|
||||
|
||||
|
@ -1053,7 +1050,7 @@ static int ft840_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
|
|||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = 0x%02x\n", __func__, vfo);
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: passed split = 0x%02x\n", __func__, split);
|
||||
|
||||
|
||||
switch(split) {
|
||||
case RIG_SPLIT_OFF:
|
||||
cmd_index = FT840_NATIVE_SPLIT_OFF;
|
||||
|
@ -1215,7 +1212,7 @@ static int ft840_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = 0x%02x\n", __func__, vfo);
|
||||
|
||||
priv = (struct ft840_priv_data *)rig->state.priv;
|
||||
|
@ -1349,9 +1346,9 @@ static int ft840_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) {
|
|||
FT840_STATUS_FLAGS_LENGTH);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
|
||||
p = &priv->update_data[FT840_SUMO_METER];
|
||||
|
||||
|
||||
/*
|
||||
* My FT-840 returns a range of 0x00 to 0x44 for S0 to S9 and 0x44 to
|
||||
* 0x9d for S9 to S9 +60
|
||||
|
@ -1372,7 +1369,7 @@ static int ft840_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) {
|
|||
} else {
|
||||
val->i = ((*p - 72) / 1.4667);
|
||||
}
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: calculated level = %i\n", __func__, val->i);
|
||||
|
||||
break;
|
||||
|
@ -1453,7 +1450,7 @@ static int ft840_get_update_data(RIG *rig, unsigned char ci, unsigned char rl) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft840_priv_data *)rig->state.priv;
|
||||
rig_s = &rig->state;
|
||||
|
||||
|
@ -1487,7 +1484,7 @@ static int ft840_send_static_cmd(RIG *rig, unsigned char ci) {
|
|||
struct rig_state *rig_s;
|
||||
struct ft840_priv_data *priv;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
@ -1495,7 +1492,7 @@ static int ft840_send_static_cmd(RIG *rig, unsigned char ci) {
|
|||
|
||||
priv = (struct ft840_priv_data *)rig->state.priv;
|
||||
rig_s = &rig->state;
|
||||
|
||||
|
||||
if (!priv->pcs[ci].ncomp) {
|
||||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"%s: Attempt to send incomplete sequence\n", __func__);
|
||||
|
@ -1531,7 +1528,7 @@ static int ft840_send_dynamic_cmd(RIG *rig, unsigned char ci,
|
|||
struct rig_state *rig_s;
|
||||
struct ft840_priv_data *priv;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
@ -1584,7 +1581,7 @@ static int ft840_send_dial_freq(RIG *rig, unsigned char ci, freq_t freq) {
|
|||
struct rig_state *rig_s;
|
||||
struct ft840_priv_data *priv;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
@ -1646,7 +1643,7 @@ static int ft840_send_rit_freq(RIG *rig, unsigned char ci, shortfreq_t rit) {
|
|||
unsigned char p1;
|
||||
unsigned char p2;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
|
|
@ -9,22 +9,19 @@
|
|||
* via serial interface to an FT-840 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft840.h,v 1.1 2009-01-04 10:40:34 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
125
yaesu/ft847.c
125
yaesu/ft847.c
|
@ -8,21 +8,20 @@
|
|||
* This shared library provides an API for communicating
|
||||
* via serial interface to an FT-847 using the "CAT" interface.
|
||||
*
|
||||
* $Id: ft847.c,v 1.34 2009-02-20 12:33:52 fillods Exp $
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -72,7 +71,7 @@ static int ft847_send_priv_cmd(RIG *rig, int cmd_index);
|
|||
/* Incomplete sequences (0) must be completed with extra parameters */
|
||||
/* eg: mem number, or freq etc.. */
|
||||
|
||||
static const yaesu_cmd_set_t ncmd[] = {
|
||||
static const yaesu_cmd_set_t ncmd[] = {
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* CAT = On */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x80 } }, /* CAT = Off */
|
||||
{ 1, { 0x00, 0x00, 0x00, 0x00, 0x08 } }, /* ptt on */
|
||||
|
@ -156,8 +155,8 @@ static const yaesu_cmd_set_t ncmd[] = {
|
|||
};
|
||||
|
||||
|
||||
/*
|
||||
* Receiver caps
|
||||
/*
|
||||
* Receiver caps
|
||||
*/
|
||||
|
||||
|
||||
|
@ -168,7 +167,7 @@ static const yaesu_cmd_set_t ncmd[] = {
|
|||
/* tx doesn't have WFM.
|
||||
* 100W in 160-6m (25 watts AM carrier)
|
||||
* 50W in 2m/70cm (12.5 watts AM carrier)
|
||||
*/
|
||||
*/
|
||||
|
||||
#define FT847_OTHER_TX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM)
|
||||
#define FT847_AM_TX_MODES (RIG_MODE_AM)
|
||||
|
@ -194,7 +193,7 @@ static const yaesu_cmd_set_t ncmd[] = {
|
|||
* c.f. ft847_set_ctcss_tone()
|
||||
*/
|
||||
static const tone_t ft847_ctcss_list[] = {
|
||||
670, 693, 719, 744, 770, 797, 825, 854, 885, 915,
|
||||
670, 693, 719, 744, 770, 797, 825, 854, 885, 915,
|
||||
948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273,
|
||||
1318, 1365, 1413, 1462, 1514, 1567, 1622, 1679, 1738, 1799,
|
||||
1862, 1928, 2035, 2107, 2181, 2257, 2336, 2418, 2503,
|
||||
|
@ -210,8 +209,8 @@ static const tone_t ft847_ctcss_list[] = {
|
|||
|
||||
const struct rig_caps ft847_caps = {
|
||||
.rig_model = RIG_MODEL_FT847,
|
||||
.model_name = "FT-847",
|
||||
.mfg_name = "Yaesu",
|
||||
.model_name = "FT-847",
|
||||
.mfg_name = "Yaesu",
|
||||
.version = "0.5",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_BETA,
|
||||
|
@ -224,7 +223,7 @@ const struct rig_caps ft847_caps = {
|
|||
.serial_data_bits = 8,
|
||||
.serial_stop_bits = 2,
|
||||
.serial_parity = RIG_PARITY_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.write_delay = FT847_WRITE_DELAY,
|
||||
.post_write_delay = FT847_POST_WRITE_DELAY,
|
||||
.timeout = 1000,
|
||||
|
@ -276,7 +275,7 @@ const struct rig_caps ft847_caps = {
|
|||
|
||||
RIG_FRNG_END, }, /* tx range end */
|
||||
|
||||
.rx_range_list2 =
|
||||
.rx_range_list2 =
|
||||
{ {kHz(100),MHz(30),FT847_ALL_RX_MODES,-1,-1}, /* rx range begin */
|
||||
{MHz(36),MHz(76),FT847_ALL_RX_MODES,-1,-1},
|
||||
{MHz(108),MHz(174),FT847_ALL_RX_MODES,-1,-1},
|
||||
|
@ -284,7 +283,7 @@ const struct rig_caps ft847_caps = {
|
|||
|
||||
RIG_FRNG_END, }, /* rx range end */
|
||||
|
||||
.tx_range_list2 =
|
||||
.tx_range_list2 =
|
||||
{
|
||||
FRQ_RNG_HF(2,FT847_OTHER_TX_MODES, W(5),W(100),FT847_VFOS,FT847_ANTS),
|
||||
FRQ_RNG_HF(2,FT847_AM_TX_MODES, W(1),W(25),FT847_VFOS,FT847_ANTS),
|
||||
|
@ -304,12 +303,12 @@ const struct rig_caps ft847_caps = {
|
|||
{FT847_SSB_CW_RX_MODES,10}, /* fast */
|
||||
{FT847_SSB_CW_RX_MODES,100}, /* faster */
|
||||
|
||||
|
||||
|
||||
{FT847_AM_FM_RX_MODES,10}, /* normal */
|
||||
{FT847_AM_FM_RX_MODES,100}, /* fast */
|
||||
|
||||
|
||||
RIG_TS_END,
|
||||
},
|
||||
},
|
||||
/* mode/filter list, .remember = order matters! */
|
||||
.filters = {
|
||||
{RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_CWR, kHz(2.2)},
|
||||
|
@ -322,10 +321,10 @@ const struct rig_caps ft847_caps = {
|
|||
},
|
||||
|
||||
.priv = NULL,
|
||||
.rig_init = ft847_init,
|
||||
.rig_cleanup = ft847_cleanup,
|
||||
.rig_open = ft847_open,
|
||||
.rig_close = ft847_close,
|
||||
.rig_init = ft847_init,
|
||||
.rig_cleanup = ft847_cleanup,
|
||||
.rig_open = ft847_open,
|
||||
.rig_close = ft847_close,
|
||||
|
||||
.set_freq = ft847_set_freq, /* set freq */
|
||||
.get_freq = ft847_get_freq, /* get freq */
|
||||
|
@ -356,18 +355,18 @@ const struct rig_caps ft847_caps = {
|
|||
*/
|
||||
|
||||
/*
|
||||
* setup *priv
|
||||
* setup *priv
|
||||
* serial port is already open (rig->state->fd)
|
||||
*/
|
||||
|
||||
int ft847_init(RIG *rig) {
|
||||
struct ft847_priv_data *p;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"%s called \n", __func__);
|
||||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
p = (struct ft847_priv_data*)malloc(sizeof(struct ft847_priv_data));
|
||||
if (!p) {
|
||||
/* whoops! memory shortage! */
|
||||
|
@ -377,7 +376,7 @@ int ft847_init(RIG *rig) {
|
|||
|
||||
p->sat_mode = RIG_SPLIT_OFF;
|
||||
rig->state.priv = (void*)p;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -390,20 +389,20 @@ int ft847_init(RIG *rig) {
|
|||
int ft847_cleanup(RIG *rig) {
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
if (rig->state.priv)
|
||||
free(rig->state.priv);
|
||||
rig->state.priv = NULL;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft847:ft847_cleanup called \n");
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ft847_open routine
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
int ft847_open(RIG *rig) {
|
||||
|
@ -417,7 +416,7 @@ int ft847_open(RIG *rig) {
|
|||
|
||||
/*
|
||||
* ft847_close routine
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
int ft847_close(RIG *rig) {
|
||||
|
@ -442,7 +441,7 @@ static int ft847_send_priv_cmd(RIG *rig, int cmd_index) {
|
|||
|
||||
struct rig_state *rig_s;
|
||||
unsigned char *cmd; /* points to sequence to send */
|
||||
|
||||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
@ -452,7 +451,7 @@ static int ft847_send_priv_cmd(RIG *rig, int cmd_index) {
|
|||
}
|
||||
|
||||
rig_s = &rig->state;
|
||||
|
||||
|
||||
cmd = (unsigned char *) ncmd[cmd_index].nseq; /* get native sequence */
|
||||
|
||||
return write_block(&rig_s->rigport, (char *) cmd, YAESU_CMD_LENGTH);
|
||||
|
@ -467,7 +466,7 @@ static int opcode_vfo(RIG *rig, unsigned char * cmd, int cmd_index, vfo_t vfo)
|
|||
{
|
||||
struct ft847_priv_data *p = (struct ft847_priv_data*)rig->state.priv;
|
||||
|
||||
memcpy(cmd, &ncmd[cmd_index].nseq,YAESU_CMD_LENGTH);
|
||||
memcpy(cmd, &ncmd[cmd_index].nseq,YAESU_CMD_LENGTH);
|
||||
|
||||
/* If the sat_mode is not enabled,
|
||||
* then leave the OpCode untouched (MAIN VFO) */
|
||||
|
@ -496,7 +495,7 @@ static int opcode_vfo(RIG *rig, unsigned char * cmd, int cmd_index, vfo_t vfo)
|
|||
|
||||
/*
|
||||
* Set frequency to freq Hz. Note 10 Hz resolution -- YUK -- FS
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
@ -512,7 +511,7 @@ int ft847_set_freq(RIG *rig, vfo_t vfo, freq_t freq) {
|
|||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft847: requested freq = %"PRIfreq" Hz, vfo=%s\n",
|
||||
freq, rig_strvfo(vfo));
|
||||
|
||||
|
||||
ret = opcode_vfo(rig, p_cmd, FT_847_NATIVE_CAT_SET_FREQ_MAIN, vfo);
|
||||
if (ret != RIG_OK)
|
||||
return ret;
|
||||
|
@ -548,7 +547,7 @@ static int get_freq_and_mode(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode,
|
|||
|
||||
cmd_index = FT_847_NATIVE_CAT_GET_FREQ_MODE_STATUS_MAIN;
|
||||
|
||||
memcpy(p_cmd,&ncmd[cmd_index].nseq,YAESU_CMD_LENGTH);
|
||||
memcpy(p_cmd,&ncmd[cmd_index].nseq,YAESU_CMD_LENGTH);
|
||||
|
||||
/* change opcode according to vfo */
|
||||
n = opcode_vfo(rig, p_cmd, cmd_index, vfo);
|
||||
|
@ -573,15 +572,15 @@ static int get_freq_and_mode(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode,
|
|||
case MD_LSB: *mode = RIG_MODE_LSB; break;
|
||||
case MD_USB: *mode = RIG_MODE_USB; break;
|
||||
|
||||
case MD_CWN:
|
||||
case MD_CWN:
|
||||
*width = rig_passband_narrow(rig, RIG_MODE_CW);
|
||||
case MD_CW:
|
||||
case MD_CW:
|
||||
*mode = RIG_MODE_CW;
|
||||
break;
|
||||
|
||||
case MD_CWNR:
|
||||
*width = rig_passband_narrow(rig, RIG_MODE_CW);
|
||||
case MD_CWR:
|
||||
case MD_CWR:
|
||||
*mode = RIG_MODE_CWR;
|
||||
break;
|
||||
|
||||
|
@ -593,8 +592,8 @@ static int get_freq_and_mode(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode,
|
|||
|
||||
case MD_FMN:
|
||||
*width = rig_passband_narrow(rig, RIG_MODE_FM);
|
||||
case MD_FM:
|
||||
*mode = RIG_MODE_FM;
|
||||
case MD_FM:
|
||||
*mode = RIG_MODE_FM;
|
||||
break;
|
||||
default:
|
||||
*mode = RIG_MODE_NONE;
|
||||
|
@ -630,7 +629,7 @@ int ft847_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) {
|
|||
unsigned char p_cmd[YAESU_CMD_LENGTH]; /* sequence to send */
|
||||
int ret;
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate mode from generic to ft847 specific
|
||||
*/
|
||||
|
||||
|
@ -684,14 +683,14 @@ int ft847_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) {
|
|||
break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode/width: %s/%d, narrow: %d\n",
|
||||
__FUNCTION__, rig_strrmode(mode), width,
|
||||
__FUNCTION__, rig_strrmode(mode), width,
|
||||
rig_passband_narrow(rig, mode));
|
||||
return -RIG_EINVAL; /* sorry, wrong MODE/WIDTH combo */
|
||||
return -RIG_EINVAL; /* sorry, wrong MODE/WIDTH combo */
|
||||
}
|
||||
} else {
|
||||
if (width != RIG_PASSBAND_NORMAL &&
|
||||
if (width != RIG_PASSBAND_NORMAL &&
|
||||
width != rig_passband_normal(rig, mode)) {
|
||||
return -RIG_EINVAL; /* sorry, wrong MODE/WIDTH combo */
|
||||
return -RIG_EINVAL; /* sorry, wrong MODE/WIDTH combo */
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
@ -796,7 +795,7 @@ int ft847_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) {
|
|||
|
||||
/*
|
||||
* phew! now send cmd to rig
|
||||
*/
|
||||
*/
|
||||
|
||||
return ft847_send_priv_cmd(rig,cmd_index);
|
||||
|
||||
|
@ -906,11 +905,11 @@ static int ft847_get_smeter_level(RIG *rig, value_t *val)
|
|||
if (n < 0)
|
||||
return n;
|
||||
|
||||
/*
|
||||
/*
|
||||
* The FT-847 S-meter readings over CAT returns
|
||||
* an integer that corresponds to the number of
|
||||
* 'dots' lit in the display. Use a conversion
|
||||
* function to convert the raw signal strength to dB
|
||||
* function to convert the raw signal strength to dB
|
||||
*/
|
||||
n = val->i;
|
||||
if (n < 4) /* <= S1 */
|
||||
|
@ -921,7 +920,7 @@ static int ft847_get_smeter_level(RIG *rig, value_t *val)
|
|||
n -= 19;
|
||||
val->i = (n * 5);
|
||||
}
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -951,7 +950,7 @@ static int ft847_get_alc_level(RIG *rig, value_t *val)
|
|||
* and PO/ALC in transmit mode. There is no way
|
||||
* to determine whether it's PO or ALC, unfortunately.
|
||||
*/
|
||||
int ft847_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t * val)
|
||||
int ft847_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t * val)
|
||||
{
|
||||
if (vfo != RIG_VFO_CURR)
|
||||
return -RIG_ENTARGET;
|
||||
|
@ -1012,10 +1011,10 @@ int ft847_set_ctcss_tone (RIG *rig, vfo_t vfo, tone_t tone)
|
|||
* 39 CTCSS CAT codes corresponding to ft847_ctcss_list
|
||||
*/
|
||||
static const unsigned char ft847_ctcss_cat[] = {
|
||||
0x3F, 0x39, 0x1F, 0x3E, 0x0F, 0x3D, 0x1E, 0x3C, 0x0E, 0x3B,
|
||||
0x1D, 0x3A, 0x0D, 0x1C, 0x0C, 0x1B, 0x0B, 0x1A, 0x0A, 0x19,
|
||||
0x09, 0x18, 0x08, 0x17, 0x07, 0x16, 0x06, 0x15, 0x05, 0x14,
|
||||
0x04, 0x13, 0x03, 0x12, 0x02, 0x11, 0x01, 0x10, 0x00,
|
||||
0x3F, 0x39, 0x1F, 0x3E, 0x0F, 0x3D, 0x1E, 0x3C, 0x0E, 0x3B,
|
||||
0x1D, 0x3A, 0x0D, 0x1C, 0x0C, 0x1B, 0x0B, 0x1A, 0x0A, 0x19,
|
||||
0x09, 0x18, 0x08, 0x17, 0x07, 0x16, 0x06, 0x15, 0x05, 0x14,
|
||||
0x04, 0x13, 0x03, 0x12, 0x02, 0x11, 0x01, 0x10, 0x00,
|
||||
};
|
||||
|
||||
ret = opcode_vfo(rig, p_cmd, FT_847_NATIVE_CAT_SET_CTCSS_FREQ_MAIN, vfo);
|
||||
|
@ -1094,7 +1093,7 @@ int ft847_set_rptr_offs (RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
|
|||
if (vfo != RIG_VFO_CURR)
|
||||
return -RIG_ENTARGET;
|
||||
|
||||
memcpy(p_cmd,&ncmd[FT_847_NATIVE_CAT_SET_RPT_OFFSET].nseq,YAESU_CMD_LENGTH);
|
||||
memcpy(p_cmd,&ncmd[FT_847_NATIVE_CAT_SET_RPT_OFFSET].nseq,YAESU_CMD_LENGTH);
|
||||
|
||||
|
||||
to_bcd_be(p_cmd,rptr_offs/10,8); /* store bcd format in in p_cmd */
|
||||
|
|
|
@ -9,22 +9,19 @@
|
|||
* via serial interface to an FT-847 using the "CAT" interface.
|
||||
*
|
||||
*
|
||||
* $Id: ft847.h,v 1.8 2009-02-20 12:33:52 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -36,7 +33,7 @@
|
|||
|
||||
/* Sequential fast writes may confuse FT847 without this delay */
|
||||
|
||||
#define FT847_POST_WRITE_DELAY 50
|
||||
#define FT847_POST_WRITE_DELAY 50
|
||||
|
||||
|
||||
/* Rough safe value for default timeout */
|
||||
|
@ -161,8 +158,8 @@ struct ft847_priv_data {
|
|||
|
||||
|
||||
|
||||
/*
|
||||
* API local implementation
|
||||
/*
|
||||
* API local implementation
|
||||
*/
|
||||
|
||||
static int ft847_init(RIG *rig);
|
||||
|
|
|
@ -14,22 +14,19 @@
|
|||
* The starting point for this code was Frank's ft847 implementation.
|
||||
*
|
||||
*
|
||||
* $Id: ft857.c,v 1.13 2009-02-20 09:55:16 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -139,8 +136,8 @@ static const yaesu_cmd_set_t ncmd[] = {
|
|||
|
||||
const struct rig_caps ft857_caps = {
|
||||
.rig_model = RIG_MODEL_FT857,
|
||||
.model_name = "FT-857",
|
||||
.mfg_name = "Yaesu",
|
||||
.model_name = "FT-857",
|
||||
.mfg_name = "Yaesu",
|
||||
.version = "0.4",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_BETA,
|
||||
|
@ -153,13 +150,13 @@ const struct rig_caps ft857_caps = {
|
|||
.serial_data_bits = 8,
|
||||
.serial_stop_bits = 2,
|
||||
.serial_parity = RIG_PARITY_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.write_delay = FT857_WRITE_DELAY,
|
||||
.post_write_delay = FT857_POST_WRITE_DELAY,
|
||||
.timeout = FT857_TIMEOUT,
|
||||
.retry = 0,
|
||||
.retry = 0,
|
||||
.has_get_func = RIG_FUNC_NONE,
|
||||
.has_set_func = RIG_FUNC_LOCK | RIG_FUNC_TONE | RIG_FUNC_TSQL,
|
||||
.has_set_func = RIG_FUNC_LOCK | RIG_FUNC_TONE | RIG_FUNC_TSQL,
|
||||
.has_get_level = RIG_LEVEL_STRENGTH | RIG_LEVEL_RFPOWER,
|
||||
.has_set_level = RIG_LEVEL_NONE,
|
||||
.has_get_parm = RIG_PARM_NONE,
|
||||
|
@ -180,12 +177,12 @@ const struct rig_caps ft857_caps = {
|
|||
.chan_list = { RIG_CHAN_END, },
|
||||
.vfo_ops = RIG_OP_TOGGLE,
|
||||
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(100),MHz(56), FT857_ALL_RX_MODES,-1,-1},
|
||||
{MHz(76), MHz(108),RIG_MODE_WFM, -1,-1},
|
||||
{MHz(118),MHz(164),FT857_ALL_RX_MODES,-1,-1},
|
||||
{MHz(420),MHz(470),FT857_ALL_RX_MODES,-1,-1},
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
.tx_range_list1 = {
|
||||
FRQ_RNG_HF(1,FT857_OTHER_TX_MODES, W(10),W(100),FT857_VFO_ALL,FT857_ANTS),
|
||||
|
@ -197,16 +194,16 @@ const struct rig_caps ft857_caps = {
|
|||
FRQ_RNG_70cm(1,FT857_OTHER_TX_MODES, W(2),W(20),FT857_VFO_ALL,FT857_ANTS),
|
||||
/* AM class */
|
||||
FRQ_RNG_70cm(1,FT857_AM_TX_MODES, W(0.5),W(5),FT857_VFO_ALL,FT857_ANTS),
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
|
||||
.rx_range_list2 = {
|
||||
.rx_range_list2 = {
|
||||
{kHz(100),MHz(56), FT857_ALL_RX_MODES,-1,-1},
|
||||
{MHz(76), MHz(108),RIG_MODE_WFM, -1,-1},
|
||||
{MHz(118),MHz(164),FT857_ALL_RX_MODES,-1,-1},
|
||||
{MHz(420),MHz(470),FT857_ALL_RX_MODES,-1,-1},
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
.tx_range_list2 = {
|
||||
FRQ_RNG_HF(2,FT857_OTHER_TX_MODES, W(10),W(100),FT857_VFO_ALL,FT857_ANTS),
|
||||
|
@ -218,7 +215,7 @@ const struct rig_caps ft857_caps = {
|
|||
FRQ_RNG_70cm(2,FT857_OTHER_TX_MODES, W(2),W(20),FT857_VFO_ALL,FT857_ANTS),
|
||||
/* AM class */
|
||||
FRQ_RNG_70cm(2,FT857_AM_TX_MODES, W(0.5),W(5),FT857_VFO_ALL,FT857_ANTS),
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.tuning_steps = {
|
||||
|
@ -239,7 +236,7 @@ const struct rig_caps ft857_caps = {
|
|||
// {RIG_MODE_RTTY, kHz(2.2)},
|
||||
// {RIG_MODE_AM, kHz(6)},
|
||||
// {RIG_MODE_FM, kHz(15)},
|
||||
// {RIG_MODE_PKTFM, kHz(15)},
|
||||
// {RIG_MODE_PKTFM, kHz(15)},
|
||||
// {RIG_MODE_FM, kHz(9)},
|
||||
// {RIG_MODE_PKTFM, kHz(9)},
|
||||
// {RIG_MODE_WFM, kHz(230)}, /* ?? */
|
||||
|
@ -247,10 +244,10 @@ const struct rig_caps ft857_caps = {
|
|||
},
|
||||
|
||||
.priv = NULL,
|
||||
.rig_init = ft857_init,
|
||||
.rig_cleanup = ft857_cleanup,
|
||||
.rig_open = ft857_open,
|
||||
.rig_close = ft857_close,
|
||||
.rig_init = ft857_init,
|
||||
.rig_cleanup = ft857_cleanup,
|
||||
.rig_open = ft857_open,
|
||||
.rig_close = ft857_close,
|
||||
.set_freq = ft857_set_freq,
|
||||
.get_freq = ft857_get_freq,
|
||||
.set_mode = ft857_set_mode,
|
||||
|
@ -296,14 +293,14 @@ const struct rig_caps ft857_caps = {
|
|||
.set_parm = NULL,
|
||||
.get_parm = NULL,
|
||||
.vfo_op = ft857_vfo_op,
|
||||
};
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int ft857_init(RIG *rig)
|
||||
{
|
||||
struct ft857_priv_data *p;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft857:ft857_init called \n");
|
||||
|
||||
if ((p = calloc(1, sizeof(struct ft857_priv_data))) == NULL)
|
||||
|
@ -313,7 +310,7 @@ int ft857_init(RIG *rig)
|
|||
memcpy(p->pcs, ncmd, sizeof(ncmd));
|
||||
|
||||
rig->state.priv = (void*) p;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -324,7 +321,7 @@ int ft857_cleanup(RIG *rig)
|
|||
if (rig->state.priv)
|
||||
free(rig->state.priv);
|
||||
rig->state.priv = NULL;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -629,7 +626,7 @@ static int ft857_read_ack(RIG *rig)
|
|||
static int ft857_send_cmd(RIG *rig, int index)
|
||||
{
|
||||
struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv;
|
||||
|
||||
|
||||
if (p->pcs[index].ncomp == 0) {
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "ft857: Incomplete sequence\n");
|
||||
return -RIG_EINTERNAL;
|
||||
|
@ -646,7 +643,7 @@ static int ft857_send_icmd(RIG *rig, int index, unsigned char *data)
|
|||
{
|
||||
struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv;
|
||||
unsigned char cmd[YAESU_CMD_LENGTH];
|
||||
|
||||
|
||||
if (p->pcs[index].ncomp == 1) {
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "ft857: Complete sequence\n");
|
||||
return -RIG_EINTERNAL;
|
||||
|
|
|
@ -12,22 +12,19 @@
|
|||
* The starting point for this code was Frank's ft847 implementation.
|
||||
*
|
||||
*
|
||||
* $Id: ft857.h,v 1.5 2009-02-20 12:26:22 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -130,7 +127,7 @@ struct ft857_priv_data {
|
|||
/* tx status */
|
||||
struct timeval tx_status_tv;
|
||||
unsigned char tx_status;
|
||||
|
||||
|
||||
/* freq & mode status */
|
||||
struct timeval fm_status_tv;
|
||||
unsigned char fm_status[YAESU_CMD_LENGTH];
|
||||
|
|
|
@ -9,22 +9,19 @@
|
|||
* via serial interface to an FT-890 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft890.c,v 1.11 2008-10-28 05:22:38 y32kn Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -281,18 +278,18 @@ const struct rig_caps ft890_caps = {
|
|||
|
||||
static int ft890_init(RIG *rig) {
|
||||
struct ft890_priv_data *priv;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft890_priv_data *)malloc(sizeof(struct ft890_priv_data));
|
||||
if (!priv) /* whoops! memory shortage! */
|
||||
return -RIG_ENOMEM;
|
||||
|
||||
|
||||
/*
|
||||
* Copy native cmd set to private cmd storage area
|
||||
* Copy native cmd set to private cmd storage area
|
||||
*/
|
||||
memcpy(priv->pcs, ncmd, sizeof(ncmd));
|
||||
|
||||
|
@ -301,7 +298,7 @@ static int ft890_init(RIG *rig) {
|
|||
priv->read_update_delay = FT890_DEFAULT_READ_TIMEOUT; /* set update timeout to safe value */
|
||||
priv->current_vfo = RIG_VFO_MAIN; /* default to whatever */
|
||||
rig->state.priv = (void *)priv;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -319,25 +316,25 @@ static int ft890_cleanup(RIG *rig) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
if (rig->state.priv)
|
||||
free(rig->state.priv);
|
||||
rig->state.priv = NULL;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* rig_open
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
static int ft890_open(RIG *rig) {
|
||||
struct rig_state *rig_s;
|
||||
struct ft890_priv_data *priv;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
@ -364,7 +361,7 @@ static int ft890_open(RIG *rig) {
|
|||
|
||||
/*
|
||||
* rig_close
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
static int ft890_close(RIG *rig) {
|
||||
|
@ -441,7 +438,7 @@ static int ft890_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft890_priv_data *)rig->state.priv;
|
||||
|
||||
if (vfo == RIG_VFO_CURR) {
|
||||
|
@ -730,7 +727,7 @@ static int ft890_set_vfo(RIG *rig, vfo_t vfo) {
|
|||
return -RIG_EINVAL;
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = 0x%02x\n", __func__, vfo);
|
||||
|
||||
|
||||
priv = (struct ft890_priv_data *)rig->state.priv;
|
||||
|
||||
if (vfo == RIG_VFO_CURR) {
|
||||
|
@ -768,7 +765,7 @@ static int ft890_set_vfo(RIG *rig, vfo_t vfo) {
|
|||
}
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: set cmd_index = %i\n", __func__, cmd_index);
|
||||
|
||||
|
||||
err = ft890_send_static_cmd(rig, cmd_index);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
@ -796,7 +793,7 @@ static int ft890_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft890_priv_data *)rig->state.priv;
|
||||
|
||||
/* Get flags for VFO status */
|
||||
|
@ -804,7 +801,7 @@ static int ft890_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
FT890_STATUS_FLAGS_LENGTH);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
|
||||
status_0 = priv->update_data[FT890_SUMO_DISPLAYED_STATUS_0];
|
||||
stat_vfo = status_0 & SF_VFO_MASK; /* get VFO active bits */
|
||||
stat_mem = status_0 & SF_MEM_MASK; /* get MEM active bits */
|
||||
|
@ -816,7 +813,7 @@ static int ft890_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"%s: stat_mem = 0x%02x\n", __func__, stat_mem);
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate vfo and mem status from ft890 to generic.
|
||||
*
|
||||
* First a test is made on bits 6 and 7 of status_0. Bit 7 is set
|
||||
|
@ -937,7 +934,7 @@ static int ft890_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft890_priv_data *)rig->state.priv;
|
||||
|
||||
/* Get flags for VFO status */
|
||||
|
@ -945,7 +942,7 @@ static int ft890_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) {
|
|||
FT890_STATUS_FLAGS_LENGTH);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
|
||||
status_2 = priv->update_data[FT890_SUMO_DISPLAYED_STATUS_2];
|
||||
stat_ptt = status_2 & SF_PTT_MASK; /* get PTT active bit */
|
||||
|
||||
|
@ -989,7 +986,7 @@ static int ft890_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
|
|||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = 0x%02x\n", __func__, vfo);
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: passed split = 0x%02x\n", __func__, split);
|
||||
|
||||
|
||||
switch(split) {
|
||||
case RIG_SPLIT_OFF:
|
||||
cmd_index = FT890_NATIVE_SPLIT_OFF;
|
||||
|
@ -1149,7 +1146,7 @@ static int ft890_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = 0x%02x\n", __func__, vfo);
|
||||
|
||||
priv = (struct ft890_priv_data *)rig->state.priv;
|
||||
|
@ -1283,9 +1280,9 @@ static int ft890_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) {
|
|||
FT890_STATUS_FLAGS_LENGTH);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
|
||||
p = &priv->update_data[FT890_SUMO_METER];
|
||||
|
||||
|
||||
/*
|
||||
* My FT-890 returns a range of 0x00 to 0x44 for S0 to S9 and 0x44 to
|
||||
* 0x9d for S9 to S9 +60
|
||||
|
@ -1306,7 +1303,7 @@ static int ft890_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) {
|
|||
} else {
|
||||
val->i = ((*p - 72) / 1.4667);
|
||||
}
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: calculated level = %i\n", __func__, val->i);
|
||||
|
||||
break;
|
||||
|
@ -1387,7 +1384,7 @@ static int ft890_get_update_data(RIG *rig, unsigned char ci, unsigned char rl) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft890_priv_data *)rig->state.priv;
|
||||
rig_s = &rig->state;
|
||||
|
||||
|
@ -1421,7 +1418,7 @@ static int ft890_send_static_cmd(RIG *rig, unsigned char ci) {
|
|||
struct rig_state *rig_s;
|
||||
struct ft890_priv_data *priv;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
@ -1429,7 +1426,7 @@ static int ft890_send_static_cmd(RIG *rig, unsigned char ci) {
|
|||
|
||||
priv = (struct ft890_priv_data *)rig->state.priv;
|
||||
rig_s = &rig->state;
|
||||
|
||||
|
||||
if (!priv->pcs[ci].ncomp) {
|
||||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"%s: Attempt to send incomplete sequence\n", __func__);
|
||||
|
@ -1465,7 +1462,7 @@ static int ft890_send_dynamic_cmd(RIG *rig, unsigned char ci,
|
|||
struct rig_state *rig_s;
|
||||
struct ft890_priv_data *priv;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
@ -1518,7 +1515,7 @@ static int ft890_send_dial_freq(RIG *rig, unsigned char ci, freq_t freq) {
|
|||
struct rig_state *rig_s;
|
||||
struct ft890_priv_data *priv;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
@ -1579,7 +1576,7 @@ static int ft890_send_rit_freq(RIG *rig, unsigned char ci, shortfreq_t rit) {
|
|||
unsigned char p1;
|
||||
unsigned char p2;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
|
|
@ -9,22 +9,19 @@
|
|||
* via serial interface to an FT-890 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft890.h,v 1.6 2005-04-03 18:57:28 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -319,7 +316,7 @@ typedef enum ft890_native_cmd_e ft890_native_cmd_t;
|
|||
#define P4 0
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* API local implementation
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -12,22 +12,19 @@
|
|||
* The starting point for this code was Frank's ft847 implementation.
|
||||
*
|
||||
*
|
||||
* $Id: ft897.c,v 1.10 2009-01-12 12:29:17 n0nb Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -177,8 +174,8 @@ static const yaesu_cmd_set_t ncmd[] = {
|
|||
|
||||
const struct rig_caps ft897_caps = {
|
||||
.rig_model = RIG_MODEL_FT897,
|
||||
.model_name = "FT-897",
|
||||
.mfg_name = "Yaesu",
|
||||
.model_name = "FT-897",
|
||||
.mfg_name = "Yaesu",
|
||||
.version = "0.3.3",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_BETA,
|
||||
|
@ -191,13 +188,13 @@ const struct rig_caps ft897_caps = {
|
|||
.serial_data_bits = 8,
|
||||
.serial_stop_bits = 2,
|
||||
.serial_parity = RIG_PARITY_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.write_delay = FT897_WRITE_DELAY,
|
||||
.post_write_delay = FT897_POST_WRITE_DELAY,
|
||||
.timeout = FT897_TIMEOUT,
|
||||
.retry = 0,
|
||||
.retry = 0,
|
||||
.has_get_func = RIG_FUNC_NONE,
|
||||
.has_set_func = RIG_FUNC_LOCK | RIG_FUNC_TONE | RIG_FUNC_TSQL,
|
||||
.has_set_func = RIG_FUNC_LOCK | RIG_FUNC_TONE | RIG_FUNC_TSQL,
|
||||
.has_get_level = RIG_LEVEL_STRENGTH | RIG_LEVEL_RFPOWER | RIG_LEVEL_SWR | RIG_LEVEL_RAWSTR,
|
||||
.has_set_level = RIG_LEVEL_NONE,
|
||||
.has_get_parm = RIG_PARM_NONE,
|
||||
|
@ -218,12 +215,12 @@ const struct rig_caps ft897_caps = {
|
|||
.chan_list = { RIG_CHAN_END, },
|
||||
.vfo_ops = RIG_OP_TOGGLE,
|
||||
|
||||
.rx_range_list1 = {
|
||||
.rx_range_list1 = {
|
||||
{kHz(100),MHz(56), FT897_ALL_RX_MODES,-1,-1},
|
||||
{MHz(76), MHz(108),RIG_MODE_WFM, -1,-1},
|
||||
{MHz(118),MHz(164),FT897_ALL_RX_MODES,-1,-1},
|
||||
{MHz(420),MHz(470),FT897_ALL_RX_MODES,-1,-1},
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
.tx_range_list1 = {
|
||||
FRQ_RNG_HF(1,FT897_OTHER_TX_MODES, W(10),W(100),FT897_VFO_ALL,FT897_ANTS),
|
||||
|
@ -235,16 +232,16 @@ const struct rig_caps ft897_caps = {
|
|||
FRQ_RNG_70cm(1,FT897_OTHER_TX_MODES, W(2),W(20),FT897_VFO_ALL,FT897_ANTS),
|
||||
/* AM class */
|
||||
FRQ_RNG_70cm(1,FT897_AM_TX_MODES, W(0.5),W(5),FT897_VFO_ALL,FT897_ANTS),
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
|
||||
.rx_range_list2 = {
|
||||
.rx_range_list2 = {
|
||||
{kHz(100),MHz(56), FT897_ALL_RX_MODES,-1,-1},
|
||||
{MHz(76), MHz(108),RIG_MODE_WFM, -1,-1},
|
||||
{MHz(118),MHz(164),FT897_ALL_RX_MODES,-1,-1},
|
||||
{MHz(420),MHz(470),FT897_ALL_RX_MODES,-1,-1},
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
.tx_range_list2 = {
|
||||
FRQ_RNG_HF(2,FT897_OTHER_TX_MODES, W(10),W(100),FT897_VFO_ALL,FT897_ANTS),
|
||||
|
@ -256,7 +253,7 @@ const struct rig_caps ft897_caps = {
|
|||
FRQ_RNG_70cm(2,FT897_OTHER_TX_MODES, W(2),W(20),FT897_VFO_ALL,FT897_ANTS),
|
||||
/* AM class */
|
||||
FRQ_RNG_70cm(2,FT897_AM_TX_MODES, W(0.5),W(5),FT897_VFO_ALL,FT897_ANTS),
|
||||
RIG_FRNG_END,
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.tuning_steps = {
|
||||
|
@ -285,10 +282,10 @@ const struct rig_caps ft897_caps = {
|
|||
},
|
||||
|
||||
.priv = NULL,
|
||||
.rig_init = ft897_init,
|
||||
.rig_cleanup = ft897_cleanup,
|
||||
.rig_open = ft897_open,
|
||||
.rig_close = ft897_close,
|
||||
.rig_init = ft897_init,
|
||||
.rig_cleanup = ft897_cleanup,
|
||||
.rig_open = ft897_open,
|
||||
.rig_close = ft897_close,
|
||||
.set_freq = ft897_set_freq,
|
||||
.get_freq = ft897_get_freq,
|
||||
.set_mode = ft897_set_mode,
|
||||
|
@ -334,14 +331,14 @@ const struct rig_caps ft897_caps = {
|
|||
.set_parm = NULL,
|
||||
.get_parm = NULL,
|
||||
.vfo_op = ft897_vfo_op,
|
||||
};
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int ft897_init(RIG *rig)
|
||||
{
|
||||
struct ft897_priv_data *p;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"ft897:ft897_init called \n");
|
||||
|
||||
if ((p = calloc(1, sizeof(struct ft897_priv_data))) == NULL)
|
||||
|
@ -351,7 +348,7 @@ int ft897_init(RIG *rig)
|
|||
memcpy(p->pcs, ncmd, sizeof(ncmd));
|
||||
|
||||
rig->state.priv = (void*) p;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -362,7 +359,7 @@ int ft897_cleanup(RIG *rig)
|
|||
if (rig->state.priv)
|
||||
free(rig->state.priv);
|
||||
rig->state.priv = NULL;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -688,7 +685,7 @@ static int ft897_read_ack(RIG *rig)
|
|||
static int ft897_send_cmd(RIG *rig, int index)
|
||||
{
|
||||
struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv;
|
||||
|
||||
|
||||
if (p->pcs[index].ncomp == 0) {
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "ft897: Incomplete sequence\n");
|
||||
return -RIG_EINTERNAL;
|
||||
|
@ -705,7 +702,7 @@ static int ft897_send_icmd(RIG *rig, int index, unsigned char *data)
|
|||
{
|
||||
struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv;
|
||||
unsigned char cmd[YAESU_CMD_LENGTH];
|
||||
|
||||
|
||||
if (p->pcs[index].ncomp == 1) {
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "ft897: Complete sequence\n");
|
||||
return -RIG_EINTERNAL;
|
||||
|
|
|
@ -10,22 +10,19 @@
|
|||
* The starting point for this code was Frank's ft847 implementation.
|
||||
*
|
||||
*
|
||||
* $Id: ft897.h,v 1.2 2005-03-26 13:03:27 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -128,7 +125,7 @@ struct ft897_priv_data {
|
|||
/* tx status */
|
||||
struct timeval tx_status_tv;
|
||||
unsigned char tx_status;
|
||||
|
||||
|
||||
/* freq & mode status */
|
||||
struct timeval fm_status_tv;
|
||||
unsigned char fm_status[YAESU_CMD_LENGTH];
|
||||
|
|
|
@ -9,22 +9,19 @@
|
|||
* via serial interface to an FT-900 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft900.c,v 1.6 2008-10-26 13:53:10 y32kn Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -281,18 +278,18 @@ const struct rig_caps ft900_caps = {
|
|||
|
||||
static int ft900_init(RIG *rig) {
|
||||
struct ft900_priv_data *priv;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft900_priv_data *)malloc(sizeof(struct ft900_priv_data));
|
||||
if (!priv) /* whoops! memory shortage! */
|
||||
return -RIG_ENOMEM;
|
||||
|
||||
|
||||
/*
|
||||
* Copy native cmd set to private cmd storage area
|
||||
* Copy native cmd set to private cmd storage area
|
||||
*/
|
||||
memcpy(priv->pcs, ncmd, sizeof(ncmd));
|
||||
|
||||
|
@ -301,7 +298,7 @@ static int ft900_init(RIG *rig) {
|
|||
priv->read_update_delay = FT900_DEFAULT_READ_TIMEOUT; /* set update timeout to safe value */
|
||||
priv->current_vfo = RIG_VFO_MAIN; /* default to whatever */
|
||||
rig->state.priv = (void *)priv;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -319,25 +316,25 @@ static int ft900_cleanup(RIG *rig) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
if (rig->state.priv)
|
||||
free(rig->state.priv);
|
||||
rig->state.priv = NULL;
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* rig_open
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
static int ft900_open(RIG *rig) {
|
||||
struct rig_state *rig_s;
|
||||
struct ft900_priv_data *priv;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
@ -364,7 +361,7 @@ static int ft900_open(RIG *rig) {
|
|||
|
||||
/*
|
||||
* rig_close
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
static int ft900_close(RIG *rig) {
|
||||
|
@ -441,7 +438,7 @@ static int ft900_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft900_priv_data *)rig->state.priv;
|
||||
|
||||
if (vfo == RIG_VFO_CURR) {
|
||||
|
@ -730,7 +727,7 @@ static int ft900_set_vfo(RIG *rig, vfo_t vfo) {
|
|||
return -RIG_EINVAL;
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = 0x%02x\n", __func__, vfo);
|
||||
|
||||
|
||||
priv = (struct ft900_priv_data *)rig->state.priv;
|
||||
|
||||
if (vfo == RIG_VFO_CURR) {
|
||||
|
@ -768,7 +765,7 @@ static int ft900_set_vfo(RIG *rig, vfo_t vfo) {
|
|||
}
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: set cmd_index = %i\n", __func__, cmd_index);
|
||||
|
||||
|
||||
err = ft900_send_static_cmd(rig, cmd_index);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
@ -796,7 +793,7 @@ static int ft900_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft900_priv_data *)rig->state.priv;
|
||||
|
||||
/* Get flags for VFO status */
|
||||
|
@ -804,7 +801,7 @@ static int ft900_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
FT900_STATUS_FLAGS_LENGTH);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
|
||||
status_0 = priv->update_data[FT900_SUMO_DISPLAYED_STATUS_0];
|
||||
stat_vfo = status_0 & SF_VFO_MASK; /* get VFO active bits */
|
||||
stat_mem = status_0 & SF_MEM_MASK; /* get MEM active bits */
|
||||
|
@ -816,7 +813,7 @@ static int ft900_get_vfo(RIG *rig, vfo_t *vfo) {
|
|||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"%s: stat_mem = 0x%02x\n", __func__, stat_mem);
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate vfo and mem status from ft900 to generic.
|
||||
*
|
||||
* First a test is made on bits 6 and 7 of status_0. Bit 7 is set
|
||||
|
@ -937,7 +934,7 @@ static int ft900_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft900_priv_data *)rig->state.priv;
|
||||
|
||||
/* Get flags for VFO status */
|
||||
|
@ -945,7 +942,7 @@ static int ft900_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) {
|
|||
FT900_STATUS_FLAGS_LENGTH);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
|
||||
status_2 = priv->update_data[FT900_SUMO_DISPLAYED_STATUS_2];
|
||||
stat_ptt = status_2 & SF_PTT_MASK; /* get PTT active bit */
|
||||
|
||||
|
@ -989,7 +986,7 @@ static int ft900_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
|
|||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = 0x%02x\n", __func__, vfo);
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: passed split = 0x%02x\n", __func__, split);
|
||||
|
||||
|
||||
switch(split) {
|
||||
case RIG_SPLIT_OFF:
|
||||
cmd_index = FT900_NATIVE_SPLIT_OFF;
|
||||
|
@ -1148,7 +1145,7 @@ static int ft900_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = 0x%02x\n", __func__, vfo);
|
||||
|
||||
priv = (struct ft900_priv_data *)rig->state.priv;
|
||||
|
@ -1282,9 +1279,9 @@ static int ft900_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) {
|
|||
FT900_STATUS_FLAGS_LENGTH);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
|
||||
p = &priv->update_data[FT900_SUMO_METER];
|
||||
|
||||
|
||||
/*
|
||||
* My FT-900 returns a range of 0x00 to 0x44 for S0 to S9 and 0x44 to
|
||||
* 0x9d for S9 to S9 +60
|
||||
|
@ -1305,7 +1302,7 @@ static int ft900_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) {
|
|||
} else {
|
||||
val->i = ((*p - 72) / 1.4667);
|
||||
}
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: calculated level = %i\n", __func__, val->i);
|
||||
|
||||
break;
|
||||
|
@ -1386,7 +1383,7 @@ static int ft900_get_update_data(RIG *rig, unsigned char ci, unsigned char rl) {
|
|||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
priv = (struct ft900_priv_data *)rig->state.priv;
|
||||
rig_s = &rig->state;
|
||||
|
||||
|
@ -1420,7 +1417,7 @@ static int ft900_send_static_cmd(RIG *rig, unsigned char ci) {
|
|||
struct rig_state *rig_s;
|
||||
struct ft900_priv_data *priv;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
@ -1428,7 +1425,7 @@ static int ft900_send_static_cmd(RIG *rig, unsigned char ci) {
|
|||
|
||||
priv = (struct ft900_priv_data *)rig->state.priv;
|
||||
rig_s = &rig->state;
|
||||
|
||||
|
||||
if (!priv->pcs[ci].ncomp) {
|
||||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"%s: Attempt to send incomplete sequence\n", __func__);
|
||||
|
@ -1464,7 +1461,7 @@ static int ft900_send_dynamic_cmd(RIG *rig, unsigned char ci,
|
|||
struct rig_state *rig_s;
|
||||
struct ft900_priv_data *priv;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
@ -1517,7 +1514,7 @@ static int ft900_send_dial_freq(RIG *rig, unsigned char ci, freq_t freq) {
|
|||
struct rig_state *rig_s;
|
||||
struct ft900_priv_data *priv;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
@ -1578,7 +1575,7 @@ static int ft900_send_rit_freq(RIG *rig, unsigned char ci, shortfreq_t rit) {
|
|||
unsigned char p1;
|
||||
unsigned char p2;
|
||||
int err;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
|
|
|
@ -9,22 +9,19 @@
|
|||
* via serial interface to an FT-900 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft900.h,v 1.2 2005-04-03 18:57:28 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -319,7 +316,7 @@ typedef enum ft900_native_cmd_e ft900_native_cmd_t;
|
|||
#define P4 0
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* API local implementation
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -9,22 +9,19 @@
|
|||
* via serial interface to an FT-9000 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft9000.c,v 1.6 2009-01-11 17:39:26 mrtembry Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,29 +2,26 @@
|
|||
* hamlib - (C) Frank Singleton 2000 (javabear at users.sourceforge.net)
|
||||
*
|
||||
* ft9000.h - (C) Nate Bargmann 2007 (n0nb at arrl.net)
|
||||
* (C) Stephane Fillod 2008
|
||||
* (C) Stephane Fillod 2008
|
||||
* (C) Terry Embry 2009
|
||||
*
|
||||
* This shared library provides an API for communicating
|
||||
* via serial interface to an FT-9000 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft9000.h,v 1.3 2009-02-20 12:39:23 fillods Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -12,20 +12,19 @@
|
|||
* pages 86 to 90
|
||||
*
|
||||
*
|
||||
* 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 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.
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -9,22 +9,19 @@
|
|||
* via serial interface to an FT-920 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft920.h,v 1.17 2008-08-06 11:09:37 n0nb Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -318,7 +315,7 @@ typedef enum ft920_native_cmd_e ft920_native_cmd_t;
|
|||
#define P4 0
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* API local implementation
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -9,22 +9,19 @@
|
|||
* via serial interface to an FT-950 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft950.c,v 1.17 2009-01-11 17:39:26 mrtembry Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -8,22 +8,19 @@
|
|||
* via serial interface to an FT-950 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft950.h,v 1.8 2008-12-17 22:57:04 mrtembry Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -6,19 +6,19 @@
|
|||
* via serial interface to an FT-980 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -187,7 +187,7 @@ const struct rig_caps ft980_caps = {
|
|||
.bank_qty = 0,
|
||||
.chan_desc_sz = 0,
|
||||
|
||||
.chan_list = {
|
||||
.chan_list = {
|
||||
{1, 16, RIG_MTYPE_MEM, FT980_MEM_CAP},
|
||||
},
|
||||
|
||||
|
@ -423,7 +423,7 @@ static void dump_memory(_ft980_memory_t *memory) {
|
|||
dump_freq(memory->mem_5);
|
||||
dump_vfo(memory->vfo_5);
|
||||
dump_mode(memory->mode_5);
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "mem_6 :");
|
||||
dump_freq(memory->mem_6);
|
||||
dump_vfo(memory->vfo_6);
|
||||
|
@ -604,7 +604,7 @@ int ft980_get_status_data(RIG *rig)
|
|||
|
||||
/*
|
||||
* ft980_open routine
|
||||
*
|
||||
*
|
||||
*/
|
||||
int ft980_open(RIG *rig)
|
||||
{
|
||||
|
@ -712,7 +712,7 @@ int ft980_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
struct ft980_priv_data *priv = (struct ft980_priv_data *)rig->state.priv;
|
||||
unsigned char md;
|
||||
|
||||
/*
|
||||
/*
|
||||
* translate mode from generic to ft980 specific
|
||||
*/
|
||||
switch(mode) {
|
||||
|
@ -729,7 +729,7 @@ int ft980_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
if (width != RIG_PASSBAND_NORMAL && width < rig_passband_normal(rig, mode)) {
|
||||
switch(md) {
|
||||
case MD_CW: md = MD_CWN; break;
|
||||
case MD_AM: md = MD_AMN; break;
|
||||
case MD_AM: md = MD_AMN; break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -818,9 +818,9 @@ int ft980_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
|
|||
return -RIG_ENIMPL;
|
||||
|
||||
/*
|
||||
* this can be misleading as Yaesu call it "Full duplex"
|
||||
* this can be misleading as Yaesu call it "Full duplex"
|
||||
* or "sat mode", and split Yaesu terms is repeater shift.
|
||||
*/
|
||||
*/
|
||||
cmd[4] = split == RIG_SPLIT_ON ? 0x0e : 0x8e;
|
||||
|
||||
return write_block(&rig->state.rigport, (char *) cmd, YAESU_CMD_LENGTH);
|
||||
|
|
|
@ -8,20 +8,19 @@
|
|||
* via serial interface to an FT-990 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* 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 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.
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -2322,7 +2321,7 @@ int ft990_get_channel (RIG *rig, channel_t *chan)
|
|||
chan->vfo = RIG_VFO_MEM;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Get data for selected VFO/MEM
|
||||
*/
|
||||
err = ft990_get_update_data(rig, ci, chan->channel_num);
|
||||
|
@ -2334,14 +2333,14 @@ int ft990_get_channel (RIG *rig, channel_t *chan)
|
|||
if (p->bpf & FT990_EMPTY_MEM)
|
||||
return RIG_OK;
|
||||
|
||||
/*
|
||||
/*
|
||||
* Get RX frequency
|
||||
*/
|
||||
chan->freq = ((((p->basefreq[0] << 8) + p->basefreq[1]) << 8) +
|
||||
p->basefreq[2]) * 10;
|
||||
|
||||
/*
|
||||
* Get RX operating mode
|
||||
* Get RX operating mode
|
||||
*/
|
||||
switch(p->mode) {
|
||||
case FT990_MODE_LSB:
|
||||
|
@ -2458,7 +2457,7 @@ int ft990_get_channel (RIG *rig, channel_t *chan)
|
|||
chan->tx_freq = ((((p->basefreq[0] << 8) + p->basefreq[1]) << 8) +
|
||||
p->basefreq[2]) * 10;
|
||||
/*
|
||||
* Get RX operating mode
|
||||
* Get RX operating mode
|
||||
*/
|
||||
switch(p->mode) {
|
||||
case FT990_MODE_LSB:
|
||||
|
|
|
@ -7,22 +7,19 @@
|
|||
* via serial interface to an FT-990 using the "CAT" interface
|
||||
*
|
||||
*
|
||||
* $Id: ft990.h,v 1.6 2006-02-26 06:17:39 bwulf Exp $
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -14,19 +14,19 @@
|
|||
* FT-950, FT-450. Much testing remains. -N0NB
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -13,20 +13,19 @@
|
|||
* FT-950, FT-450. Much testing remains. -N0NB
|
||||
*
|
||||
*
|
||||
* 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 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.
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -4,21 +4,20 @@
|
|||
* This shared library provides an API for communicating
|
||||
* via serial interface to an VR-5000 using the "CAT" interface
|
||||
*
|
||||
* $Id: vr5000.c,v 1.3 2006-10-07 15:51:38 csete 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -11,21 +11,20 @@
|
|||
* not used and always zero. Thus bytes 0x15,0xBE,0x68,0x00 means
|
||||
* frequency = 10 * 0x15BE68 = 10 * 1425000 = 14.25 MHz
|
||||
*
|
||||
* $Id: vx1700.c,v 1.0 2010-12-27
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -11,21 +11,20 @@
|
|||
* not used and always zero. Thus bytes 0x15,0xBE,0x68,0x00 means
|
||||
* frequency = 10 * 0x15BE68 = 10 * 1425000 = 14.25 MHz
|
||||
*
|
||||
* $Id: vx1700.h,v 1.0 2010-12-27
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -7,20 +7,19 @@
|
|||
* via serial interface to a Yaesu rig
|
||||
*
|
||||
*
|
||||
* 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 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.
|
||||
* 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.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -141,7 +140,7 @@ DECLARE_PROBERIG_BACKEND(yaesu)
|
|||
for (rates_idx = 0; rates[rates_idx]; rates_idx++) {
|
||||
port->parm.serial.rate = rates[rates_idx];
|
||||
port->timeout = 2*1000/rates[rates_idx] + 50;
|
||||
|
||||
|
||||
retval = serial_open(port);
|
||||
if (retval != RIG_OK)
|
||||
return RIG_MODEL_NONE;
|
||||
|
@ -159,7 +158,7 @@ DECLARE_PROBERIG_BACKEND(yaesu)
|
|||
if (retval != RIG_OK || id_len < 0)
|
||||
return RIG_MODEL_NONE;
|
||||
|
||||
/*
|
||||
/*
|
||||
* reply should be [Flag1,Flag2,Flag3,ID1,ID2]
|
||||
*/
|
||||
if (id_len != 5 || id_len != 6) {
|
||||
|
@ -183,7 +182,7 @@ DECLARE_PROBERIG_BACKEND(yaesu)
|
|||
}
|
||||
|
||||
/*
|
||||
* not found in known table....
|
||||
* not found in known table....
|
||||
* update yaesu_id_list[]!
|
||||
*/
|
||||
rig_debug(RIG_DEBUG_WARN,"probe_yaesu: found unknown device "
|
||||
|
|
|
@ -2,24 +2,24 @@
|
|||
* hamlib - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com)
|
||||
*
|
||||
* yaesu.h - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com)
|
||||
* (C) Stephane Fillod 2001-2010
|
||||
* (C) Stephane Fillod 2001-2010
|
||||
*
|
||||
* Common yaesu declarations for hamlib
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -42,7 +42,7 @@ struct yaesu_cmd_set {
|
|||
unsigned char nseq[YAESU_CMD_LENGTH]; /* native cmd sequence */
|
||||
};
|
||||
|
||||
typedef struct yaesu_cmd_set yaesu_cmd_set_t;
|
||||
typedef struct yaesu_cmd_set yaesu_cmd_set_t;
|
||||
|
||||
extern const struct rig_caps ft100_caps;
|
||||
extern const struct rig_caps ft450_caps;
|
||||
|
|
Ładowanie…
Reference in New Issue