kopia lustrzana https://github.com/Hamlib/Hamlib
clone FT-DX5000 after FT-2000
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2992 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.13
rodzic
090fe03b5d
commit
aa24ca7ab6
|
@ -3,7 +3,6 @@
|
|||
* Copyright (c) 2000-2003 by Frank Singleton
|
||||
* Copyright (c) 2000-2010 by Stephane Fillod
|
||||
*
|
||||
* $Id: riglist.h,v 1.76 2009-01-29 22:54:40 fillods Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
|
@ -94,6 +93,7 @@
|
|||
#define RIG_MODEL_FT2000 RIG_MAKE_MODEL(RIG_YAESU, 29)
|
||||
#define RIG_MODEL_FT9000 RIG_MAKE_MODEL(RIG_YAESU, 30)
|
||||
#define RIG_MODEL_FT980 RIG_MAKE_MODEL(RIG_YAESU, 31)
|
||||
#define RIG_MODEL_FTDX5000 RIG_MAKE_MODEL(RIG_YAESU, 32)
|
||||
|
||||
/*
|
||||
* Kenwood
|
||||
|
|
|
@ -7,7 +7,7 @@ YAESUSRC = ft100.c ft747.c ft817.c ft847.c ft890.c ft900.c ft920.c \
|
|||
vr5000.c ft767gx.c ft840.c ft980.c
|
||||
|
||||
## Yaesu radios that use the new Kenwood style CAT commands
|
||||
NEWCATSRC = newcat.c ft450.c ft950.c ft2000.c ft9000.c
|
||||
NEWCATSRC = newcat.c ft450.c ft950.c ft2000.c ft9000.c ft5000.c
|
||||
|
||||
pkglib_LTLIBRARIES = hamlib-yaesu.la
|
||||
hamlib_yaesu_la_SOURCES = $(YAESUSRC) $(NEWCATSRC) yaesu.c
|
||||
|
@ -18,5 +18,5 @@ hamlib_yaesu_la_LIBADD = $(top_builddir)/lib/libmisc.la \
|
|||
|
||||
noinst_HEADERS = ft100.h ft747.h ft817.h ft847.h ft890.h ft900.h ft920.h \
|
||||
ft1000mp.h ft857.h ft897.h ft990.h yaesu.h \
|
||||
ft757gx.h ft767gx.h ft450.h ft950.h ft2000.h ft9000.h \
|
||||
ft757gx.h ft767gx.h ft450.h ft950.h ft2000.h ft9000.h ft5000.h \
|
||||
ft840.h newcat.h
|
||||
|
|
|
@ -0,0 +1,207 @@
|
|||
/*
|
||||
* hamlib - (C) Frank Singleton 2000 (javabear at users.sourceforge.net)
|
||||
*
|
||||
* ft2000.c - (C) Nate Bargmann 2007 (n0nb at arrl.net)
|
||||
* (C) Stephane Fillod 2008-2010
|
||||
* (C) Terry Embry 2008-2009
|
||||
*
|
||||
* This shared library provides an API for communicating
|
||||
* 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 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "hamlib/rig.h"
|
||||
#include "bandplan.h"
|
||||
#include "serial.h"
|
||||
#include "misc.h"
|
||||
#include "yaesu.h"
|
||||
#include "newcat.h"
|
||||
#include "ft5000.h"
|
||||
#include "idx_builtin.h"
|
||||
#include "tones.h"
|
||||
|
||||
/*
|
||||
* ft5000 rigs capabilities.
|
||||
* Also this struct is READONLY!
|
||||
*
|
||||
*/
|
||||
|
||||
const struct rig_caps ftdx5000_caps = {
|
||||
.rig_model = RIG_MODEL_FTDX5000,
|
||||
.model_name = "FT-DX5000",
|
||||
.mfg_name = "Yaesu",
|
||||
.version = NEWCAT_VER,
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_ALPHA,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
.ptt_type = RIG_PTT_RIG,
|
||||
.dcd_type = RIG_DCD_NONE,
|
||||
.port_type = RIG_PORT_SERIAL,
|
||||
.serial_rate_min = 4800, /* Default rate per manual */
|
||||
.serial_rate_max = 38400,
|
||||
.serial_data_bits = 8,
|
||||
.serial_stop_bits = 1, /* Assumed since manual makes no mention */
|
||||
.serial_parity = RIG_PARITY_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.write_delay = FTDX5000_WRITE_DELAY,
|
||||
.post_write_delay = FTDX5000_POST_WRITE_DELAY,
|
||||
.timeout = 2000,
|
||||
.retry = 0,
|
||||
.has_get_func = FTDX5000_FUNCS,
|
||||
.has_set_func = FTDX5000_FUNCS,
|
||||
.has_get_level = FTDX5000_LEVELS,
|
||||
.has_set_level = RIG_LEVEL_SET(FTDX5000_LEVELS),
|
||||
.has_get_parm = RIG_PARM_NONE,
|
||||
.has_set_parm = RIG_PARM_NONE,
|
||||
.level_gran = {
|
||||
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
|
||||
[LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 1050 }, .step = { .i = 50 } },
|
||||
},
|
||||
.ctcss_list = common_ctcss_list,
|
||||
.dcs_list = NULL,
|
||||
.preamp = { 10, 20, RIG_DBLST_END, }, /* TBC */
|
||||
.attenuator = { 6, 12, 18, RIG_DBLST_END, },
|
||||
.max_rit = Hz(9999),
|
||||
.max_xit = Hz(9999),
|
||||
.max_ifshift = Hz(1000),
|
||||
.vfo_ops = FTDX5000_VFO_OPS,
|
||||
.targetable_vfo = RIG_TARGETABLE_FREQ|RIG_TARGETABLE_MODE,
|
||||
.transceive = RIG_TRN_OFF, /* May enable later as the 5000 has an Auto Info command */
|
||||
.bank_qty = 0,
|
||||
.chan_desc_sz = 0,
|
||||
.str_cal = FTDX5000_STR_CAL,
|
||||
.chan_list = {
|
||||
{ 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP },
|
||||
{ 100, 117, RIG_MTYPE_EDGE, NEWCAT_MEM_CAP }, /* two by two */
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
.rx_range_list1 = {
|
||||
/* General coverage + ham, ANT_5 is RX only antenna */
|
||||
{kHz(30), MHz(60), FTDX5000_ALL_RX_MODES, -1, -1, FTDX5000_VFO_ALL, FTDX5000_TX_ANTS|RIG_ANT_5},
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.tx_range_list1 = {
|
||||
FRQ_RNG_HF(1, FTDX5000_OTHER_TX_MODES, W(5), W(200), FTDX5000_VFO_ALL, FTDX5000_TX_ANTS),
|
||||
FRQ_RNG_HF(1, FTDX5000_AM_TX_MODES, W(2), W(75), FTDX5000_VFO_ALL, FTDX5000_TX_ANTS), /* AM class */
|
||||
FRQ_RNG_6m(1, FTDX5000_OTHER_TX_MODES, W(5), W(200), FTDX5000_VFO_ALL, FTDX5000_TX_ANTS),
|
||||
FRQ_RNG_6m(1, FTDX5000_AM_TX_MODES, W(2), W(75), FTDX5000_VFO_ALL, FTDX5000_TX_ANTS), /* AM class */
|
||||
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.rx_range_list2 = {
|
||||
{kHz(30), MHz(60), FTDX5000_ALL_RX_MODES, -1, -1, FTDX5000_VFO_ALL, FTDX5000_TX_ANTS|RIG_ANT_5},
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.tx_range_list2 = {
|
||||
FRQ_RNG_HF(2, FTDX5000_OTHER_TX_MODES, W(5), W(200), FTDX5000_VFO_ALL, FTDX5000_TX_ANTS),
|
||||
FRQ_RNG_HF(2, FTDX5000_AM_TX_MODES, W(2), W(75), FTDX5000_VFO_ALL, FTDX5000_TX_ANTS), /* AM class */
|
||||
FRQ_RNG_6m(2, FTDX5000_OTHER_TX_MODES, W(5), W(200), FTDX5000_VFO_ALL, FTDX5000_TX_ANTS),
|
||||
FRQ_RNG_6m(2, FTDX5000_AM_TX_MODES, W(2), W(75), FTDX5000_VFO_ALL, FTDX5000_TX_ANTS), /* AM class */
|
||||
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.tuning_steps = {
|
||||
{FTDX5000_SSB_CW_RX_MODES, Hz(10)}, /* Normal */
|
||||
{FTDX5000_SSB_CW_RX_MODES, Hz(100)}, /* Fast */
|
||||
|
||||
{FTDX5000_AM_RX_MODES, Hz(100)}, /* Normal */
|
||||
{FTDX5000_AM_RX_MODES, kHz(1)}, /* Fast */
|
||||
|
||||
{FTDX5000_FM_RX_MODES, Hz(100)}, /* Normal */
|
||||
{FTDX5000_FM_RX_MODES, kHz(1)}, /* Fast */
|
||||
|
||||
RIG_TS_END,
|
||||
|
||||
},
|
||||
|
||||
/* mode/filter list, .remember = order matters! */
|
||||
.filters = {
|
||||
{FTDX5000_CW_RTTY_PKT_RX_MODES, Hz(1800)}, /* Normal CW, RTTY, PKT/USER */
|
||||
{FTDX5000_CW_RTTY_PKT_RX_MODES, Hz(500)}, /* Narrow CW, RTTY, PKT/USER */
|
||||
{FTDX5000_CW_RTTY_PKT_RX_MODES, Hz(2400)}, /* Wide CW, RTTY, PKT/USER */
|
||||
{RIG_MODE_SSB, Hz(2400)}, /* Normal SSB */
|
||||
{RIG_MODE_SSB, Hz(1800)}, /* Narrow SSB */
|
||||
{RIG_MODE_SSB, Hz(3000)}, /* Wide SSB */
|
||||
{RIG_MODE_AM, Hz(9000)}, /* Normal AM */
|
||||
{RIG_MODE_AM, Hz(6000)}, /* Narrow AM */
|
||||
{FTDX5000_FM_RX_MODES, Hz(15000)}, /* Normal FM */
|
||||
{FTDX5000_FM_RX_MODES, Hz(8000)}, /* Narrow FM */
|
||||
|
||||
RIG_FLT_END,
|
||||
},
|
||||
|
||||
.priv = NULL,
|
||||
|
||||
.rig_init = newcat_init,
|
||||
.rig_cleanup = newcat_cleanup,
|
||||
.rig_open = newcat_open, /* port opened */
|
||||
.rig_close = newcat_close, /* port closed */
|
||||
|
||||
.set_freq = newcat_set_freq,
|
||||
.get_freq = newcat_get_freq,
|
||||
.set_mode = newcat_set_mode,
|
||||
.get_mode = newcat_get_mode,
|
||||
.set_vfo = newcat_set_vfo,
|
||||
.get_vfo = newcat_get_vfo,
|
||||
.set_ptt = newcat_set_ptt,
|
||||
.get_ptt = newcat_get_ptt,
|
||||
.set_split_vfo = newcat_set_split_vfo,
|
||||
.get_split_vfo = newcat_get_split_vfo,
|
||||
.set_rit = newcat_set_rit,
|
||||
.get_rit = newcat_get_rit,
|
||||
.set_xit = newcat_set_xit,
|
||||
.get_xit = newcat_get_xit,
|
||||
.set_ant = newcat_set_ant,
|
||||
.get_ant = newcat_get_ant,
|
||||
.get_func = newcat_get_func,
|
||||
.set_func = newcat_set_func,
|
||||
.get_level = newcat_get_level,
|
||||
.set_level = newcat_set_level,
|
||||
.get_mem = newcat_get_mem,
|
||||
.set_mem = newcat_set_mem,
|
||||
.vfo_op = newcat_vfo_op,
|
||||
.get_info = newcat_get_info,
|
||||
.power2mW = newcat_power2mW,
|
||||
.mW2power = newcat_mW2power,
|
||||
.set_rptr_shift = newcat_set_rptr_shift,
|
||||
.get_rptr_shift = newcat_get_rptr_shift,
|
||||
.set_ctcss_tone = newcat_set_ctcss_tone,
|
||||
.get_ctcss_tone = newcat_get_ctcss_tone,
|
||||
.set_ctcss_sql = newcat_set_ctcss_sql,
|
||||
.get_ctcss_sql = newcat_get_ctcss_sql,
|
||||
.set_powerstat = newcat_set_powerstat,
|
||||
.get_powerstat = newcat_get_powerstat,
|
||||
.get_ts = newcat_get_ts,
|
||||
.set_ts = newcat_set_ts,
|
||||
.set_trn = newcat_set_trn,
|
||||
.get_trn = newcat_get_trn,
|
||||
.set_channel = newcat_set_channel,
|
||||
.get_channel = newcat_get_channel,
|
||||
|
||||
};
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
/*
|
||||
* hamlib - (C) Frank Singleton 2000 (javabear at users.sourceforge.net)
|
||||
*
|
||||
* ft5000.h - (C) Nate Bargmann 2007 (n0nb at arrl.net)
|
||||
* (C) Stephane Fillod 2008-2010
|
||||
*
|
||||
* This shared library provides an API for communicating
|
||||
* 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 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _FT5000_H
|
||||
#define _FT5000_H 1
|
||||
|
||||
#if 0
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#define ON TRUE
|
||||
#define OFF FALSE
|
||||
#endif
|
||||
|
||||
#define FTDX5000_VFO_ALL (RIG_VFO_A|RIG_VFO_B)
|
||||
|
||||
/* Receiver caps */
|
||||
|
||||
#define FTDX5000_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|\
|
||||
RIG_MODE_RTTY|RIG_MODE_RTTYR|\
|
||||
RIG_MODE_PKTLSB|RIG_MODE_PKTUSB|RIG_MODE_PKTFM)
|
||||
|
||||
#define FTDX5000_SSB_CW_RX_MODES (RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|\
|
||||
RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_PKTLSB|RIG_MODE_PKTUSB)
|
||||
#define FTDX5000_AM_RX_MODES (RIG_MODE_AM)
|
||||
#define FTDX5000_FM_RX_MODES (RIG_MODE_FM|RIG_MODE_PKTFM)
|
||||
#define FTDX5000_CW_RTTY_PKT_RX_MODES (RIG_MODE_RTTY|RIG_MODE_RTTYR|\
|
||||
RIG_MODE_PKTUSB|RIG_MODE_PKTLSB|RIG_MODE_CW|RIG_MODE_CWR)
|
||||
|
||||
|
||||
|
||||
|
||||
/* TRX caps */
|
||||
|
||||
#define FTDX5000_OTHER_TX_MODES (RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_RTTY| \
|
||||
RIG_MODE_PKTLSB|RIG_MODE_PKTUSB|RIG_MODE_PKTFM) /* 100 W class */
|
||||
#define FTDX5000_AM_TX_MODES (RIG_MODE_AM) /* set 25W max */
|
||||
|
||||
/* TBC */
|
||||
#define FTDX5000_LEVELS (RIG_LEVEL_ATT|RIG_LEVEL_PREAMP|\
|
||||
RIG_LEVEL_ALC|RIG_LEVEL_RAWSTR|RIG_LEVEL_SWR|\
|
||||
RIG_LEVEL_RFPOWER|RIG_LEVEL_RF|RIG_LEVEL_SQL|\
|
||||
RIG_LEVEL_MICGAIN|RIG_LEVEL_IF|RIG_LEVEL_CWPITCH|\
|
||||
RIG_LEVEL_KEYSPD|RIG_LEVEL_AF|RIG_LEVEL_AGC|\
|
||||
RIG_LEVEL_METER|RIG_LEVEL_BKINDL|RIG_LEVEL_SQL|\
|
||||
RIG_LEVEL_VOXGAIN|RIG_LEVEL_VOXDELAY|RIG_LEVEL_COMP|\
|
||||
RIG_LEVEL_ANTIVOX|RIG_LEVEL_NR|RIG_LEVEL_NOTCHF)
|
||||
|
||||
/* TBC */
|
||||
#define FTDX5000_FUNCS (RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_LOCK|\
|
||||
RIG_FUNC_MON|RIG_FUNC_NB|RIG_FUNC_NR|RIG_FUNC_VOX|\
|
||||
RIG_FUNC_FBKIN|RIG_FUNC_COMP|RIG_FUNC_ANF|RIG_FUNC_MN)
|
||||
|
||||
/* TBC */
|
||||
#define FTDX5000_VFO_OPS (RIG_OP_TUNE|RIG_OP_CPY|RIG_OP_XCHG|\
|
||||
RIG_OP_UP|RIG_OP_DOWN|RIG_OP_BAND_UP|RIG_OP_BAND_DOWN|\
|
||||
RIG_OP_TO_VFO|RIG_OP_FROM_VFO|RIG_OP_TOGGLE)
|
||||
|
||||
/* TBC */
|
||||
#define FTDX5000_STR_CAL { 16, \
|
||||
{ \
|
||||
{ 0, -54 }, /* S0 */ \
|
||||
{ 12, -48 }, /* S1 */ \
|
||||
{ 27, -42 }, /* S2 */ \
|
||||
{ 40, -36 }, /* S3 */ \
|
||||
{ 55, -30 }, /* S4 */ \
|
||||
{ 65, -24 }, /* S5 */ \
|
||||
{ 80, -18 }, /* S6 */ \
|
||||
{ 95, -12 }, /* S7 */ \
|
||||
{ 112, -6 }, /* S8 */ \
|
||||
{ 130, 0 }, /* S9 */ \
|
||||
{ 150, 10 }, /* +10 */ \
|
||||
{ 172, 20 }, /* +20 */ \
|
||||
{ 190, 30 }, /* +30 */ \
|
||||
{ 220, 40 }, /* +40 */ \
|
||||
{ 240, 50 }, /* +50 */ \
|
||||
{ 255, 60 }, /* +60 */ \
|
||||
} }
|
||||
|
||||
|
||||
/*
|
||||
* Other features (used by rig_caps)
|
||||
*
|
||||
*/
|
||||
|
||||
#define FTDX5000_TX_ANTS (RIG_ANT_1|RIG_ANT_2)
|
||||
|
||||
#define FTDX5000_MEM_CHNL_LENGTH 1 /* 0x10 P1 = 01 return size */
|
||||
#define FTDX5000_OP_DATA_LENGTH 19 /* 0x10 P1 = 03 return size */
|
||||
#define FTDX5000_VFO_DATA_LENGTH 18 /* 0x10 P1 = 03 return size -- A & B returned */
|
||||
#define FTDX5000_MEM_CHNL_DATA_LENGTH 19 /* 0x10 P1 = 04, P4 = 0x01-0x20 return size */
|
||||
#define FTDX5000_STATUS_FLAGS_LENGTH 5 /* 0xf7, 0xfa return size */
|
||||
#define FTDX5000_ALL_DATA_LENGTH 649 /* 0x10 P1 = 00 return size */
|
||||
|
||||
/* Timing values in mS */
|
||||
|
||||
#define FTDX5000_PACING_INTERVAL 5
|
||||
#define FTDX5000_PACING_DEFAULT_VALUE 0
|
||||
#define FTDX5000_WRITE_DELAY 50
|
||||
|
||||
|
||||
/* Delay sequential fast writes */
|
||||
|
||||
#define FTDX5000_POST_WRITE_DELAY 5
|
||||
|
||||
#endif /* _FT5000_H */
|
305
yaesu/newcat.c
305
yaesu/newcat.c
|
@ -3,20 +3,17 @@
|
|||
* and the Hamlib Group (hamlib-developer at lists.sourceforge.net)
|
||||
*
|
||||
* newcat.c - (C) Nate Bargmann 2007 (n0nb at arrl.net)
|
||||
* (C) Stephane Fillod 2008
|
||||
* (C) Stephane Fillod 2008-2010
|
||||
* (C) Terry Embry 2008-2010
|
||||
*
|
||||
* This shared library provides an API for communicating
|
||||
* via serial interface to any newer Yaesu radio using the
|
||||
* "new" text CAT interface.
|
||||
*
|
||||
* Models this code aims to support are FTDX-9000*, FT-2000,
|
||||
* Models this code aims to support are FTDX-9000*, FT-2000, FT-DX5000,
|
||||
* FT-950, FT-450. Much testing remains. -N0NB
|
||||
*
|
||||
*
|
||||
* $Id: newcat.c,v 1.56 2009-02-26 23:04: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
|
||||
|
@ -64,7 +61,8 @@ typedef enum nc_rigid_e {
|
|||
NC_RIGID_FT2000D = 252,
|
||||
NC_RIGID_FTDX9000D = 101,
|
||||
NC_RIGID_FTDX9000Contest = 102,
|
||||
NC_RIGID_FTDX9000MP = 103
|
||||
NC_RIGID_FTDX9000MP = 103,
|
||||
NC_RIGID_FTDX5000 = 362
|
||||
} nc_rigid_t;
|
||||
|
||||
|
||||
|
@ -79,11 +77,12 @@ typedef struct _yaesu_newcat_commands {
|
|||
ncboolean ft950;
|
||||
ncboolean ft2000;
|
||||
ncboolean ft9000;
|
||||
ncboolean ft5000;
|
||||
} yaesu_newcat_commands_t;
|
||||
|
||||
/*
|
||||
* Even thought this table does make a handy reference, it could be depreciated as it is not really needed.
|
||||
* All of the CAT commands used in the newcat interface are available on the FT-950, FT-2000, and FT-9000.
|
||||
* All of the CAT commands used in the newcat interface are available on the FT-950, FT-2000, FT-5000, and FT-9000.
|
||||
* There are 5 CAT commands used in the newcat interface that are not available on the FT-450.
|
||||
* Thesec CAT commands are XT -TX Clarifier ON/OFF, AN - Antenna select, PL - Speech Proc Level,
|
||||
* PR - Speech Proc ON/OFF, and BC - Auto Notch filter ON/OFF.
|
||||
|
@ -98,109 +97,109 @@ typedef struct _yaesu_newcat_commands {
|
|||
*
|
||||
*/
|
||||
static const yaesu_newcat_commands_t valid_commands[] = {
|
||||
/* Command FT-450 FT-950 FT-2000 FT-9000 */
|
||||
{"AB", FALSE, TRUE, TRUE, TRUE },
|
||||
{"AC", TRUE, TRUE, TRUE, TRUE },
|
||||
{"AG", TRUE, TRUE, TRUE, TRUE },
|
||||
{"AI", TRUE, TRUE, TRUE, TRUE },
|
||||
{"AM", FALSE, TRUE, TRUE, TRUE },
|
||||
{"AN", FALSE, TRUE, TRUE, TRUE },
|
||||
{"BC", FALSE, TRUE, TRUE, TRUE },
|
||||
{"BD", TRUE, TRUE, TRUE, TRUE },
|
||||
{"BI", TRUE, TRUE, TRUE, TRUE },
|
||||
{"BP", TRUE, TRUE, TRUE, TRUE },
|
||||
{"BS", TRUE, TRUE, TRUE, TRUE },
|
||||
{"BU", TRUE, TRUE, TRUE, TRUE },
|
||||
{"BY", TRUE, TRUE, TRUE, TRUE },
|
||||
{"CH", TRUE, TRUE, TRUE, TRUE },
|
||||
{"CN", TRUE, TRUE, TRUE, TRUE },
|
||||
{"CO", TRUE, TRUE, TRUE, TRUE },
|
||||
{"CS", TRUE, TRUE, TRUE, TRUE },
|
||||
{"CT", TRUE, TRUE, TRUE, TRUE },
|
||||
{"DA", TRUE, TRUE, TRUE, TRUE },
|
||||
{"DN", TRUE, TRUE, TRUE, TRUE },
|
||||
{"DP", FALSE, TRUE, TRUE, TRUE },
|
||||
{"DS", TRUE, FALSE, TRUE, TRUE },
|
||||
{"ED", TRUE, TRUE, TRUE, TRUE },
|
||||
{"EK", FALSE, TRUE, TRUE, TRUE },
|
||||
{"EU", TRUE, TRUE, TRUE, TRUE },
|
||||
{"EX", TRUE, TRUE, TRUE, TRUE },
|
||||
{"FA", TRUE, TRUE, TRUE, TRUE },
|
||||
{"FB", TRUE, TRUE, TRUE, TRUE },
|
||||
{"FK", FALSE, TRUE, TRUE, TRUE },
|
||||
{"FR", FALSE, TRUE, TRUE, TRUE },
|
||||
{"FS", TRUE, TRUE, TRUE, TRUE },
|
||||
{"FT", TRUE, TRUE, TRUE, TRUE },
|
||||
{"GT", TRUE, TRUE, TRUE, TRUE },
|
||||
{"ID", TRUE, TRUE, TRUE, TRUE },
|
||||
{"IF", TRUE, TRUE, TRUE, TRUE },
|
||||
{"IS", TRUE, TRUE, TRUE, TRUE },
|
||||
{"KM", TRUE, TRUE, TRUE, TRUE },
|
||||
{"KP", TRUE, TRUE, TRUE, TRUE },
|
||||
{"KR", TRUE, TRUE, TRUE, TRUE },
|
||||
{"KS", TRUE, TRUE, TRUE, TRUE },
|
||||
{"KY", TRUE, TRUE, TRUE, TRUE },
|
||||
{"LK", TRUE, TRUE, TRUE, TRUE },
|
||||
{"LM", TRUE, TRUE, TRUE, TRUE },
|
||||
{"MA", FALSE, TRUE, TRUE, TRUE },
|
||||
{"MC", TRUE, TRUE, TRUE, TRUE },
|
||||
{"MD", TRUE, TRUE, TRUE, TRUE },
|
||||
{"MG", TRUE, TRUE, TRUE, TRUE },
|
||||
{"MK", TRUE, TRUE, TRUE, TRUE },
|
||||
{"ML", TRUE, TRUE, TRUE, TRUE },
|
||||
{"MR", TRUE, TRUE, TRUE, TRUE },
|
||||
{"MS", TRUE, TRUE, TRUE, TRUE },
|
||||
{"MW", TRUE, TRUE, TRUE, TRUE },
|
||||
{"MX", FALSE, TRUE, TRUE, TRUE },
|
||||
{"NA", TRUE, TRUE, TRUE, TRUE },
|
||||
{"NB", TRUE, TRUE, TRUE, TRUE },
|
||||
{"NL", FALSE, TRUE, TRUE, TRUE },
|
||||
{"NR", TRUE, TRUE, TRUE, TRUE },
|
||||
{"OI", TRUE, TRUE, TRUE, TRUE },
|
||||
{"OS", TRUE, TRUE, TRUE, TRUE },
|
||||
{"PA", TRUE, TRUE, TRUE, TRUE },
|
||||
{"PB", TRUE, TRUE, TRUE, TRUE },
|
||||
{"PC", TRUE, TRUE, TRUE, TRUE },
|
||||
{"PL", FALSE, TRUE, TRUE, TRUE },
|
||||
{"PR", FALSE, TRUE, TRUE, TRUE },
|
||||
{"PS", TRUE, TRUE, TRUE, TRUE },
|
||||
{"QI", TRUE, TRUE, TRUE, TRUE },
|
||||
{"QR", TRUE, TRUE, TRUE, TRUE },
|
||||
{"QS", TRUE, TRUE, TRUE, TRUE },
|
||||
{"RA", TRUE, TRUE, TRUE, TRUE },
|
||||
{"RC", TRUE, TRUE, TRUE, TRUE },
|
||||
{"RD", TRUE, TRUE, TRUE, TRUE },
|
||||
{"RF", FALSE, TRUE, TRUE, TRUE },
|
||||
{"RG", TRUE, TRUE, TRUE, TRUE },
|
||||
{"RI", TRUE, TRUE, TRUE, TRUE },
|
||||
{"RL", TRUE, TRUE, TRUE, TRUE },
|
||||
{"RM", TRUE, TRUE, TRUE, TRUE },
|
||||
{"RO", FALSE, TRUE, TRUE, TRUE },
|
||||
{"RP", TRUE, FALSE, FALSE, FALSE },
|
||||
{"RS", TRUE, TRUE, TRUE, TRUE },
|
||||
{"RT", TRUE, TRUE, TRUE, TRUE },
|
||||
{"RU", TRUE, TRUE, TRUE, TRUE },
|
||||
{"SC", TRUE, TRUE, TRUE, TRUE },
|
||||
{"SD", TRUE, TRUE, TRUE, TRUE },
|
||||
{"SF", FALSE, TRUE, TRUE, TRUE },
|
||||
{"SH", TRUE, TRUE, TRUE, TRUE },
|
||||
{"SM", TRUE, TRUE, TRUE, TRUE },
|
||||
{"SQ", TRUE, TRUE, TRUE, TRUE },
|
||||
{"ST", TRUE, FALSE, FALSE, FALSE },
|
||||
{"SV", TRUE, TRUE, TRUE, TRUE },
|
||||
{"TS", TRUE, TRUE, TRUE, TRUE },
|
||||
{"TX", TRUE, TRUE, TRUE, TRUE },
|
||||
{"UL", TRUE, TRUE, TRUE, TRUE },
|
||||
{"UP", TRUE, TRUE, TRUE, TRUE },
|
||||
{"VD", TRUE, TRUE, TRUE, TRUE },
|
||||
{"VF", FALSE, TRUE, TRUE, TRUE },
|
||||
{"VG", TRUE, TRUE, TRUE, TRUE },
|
||||
{"VM", TRUE, TRUE, TRUE, TRUE },
|
||||
{"VR", TRUE, FALSE, FALSE, FALSE },
|
||||
{"VS", TRUE, TRUE, TRUE, TRUE },
|
||||
{"VV", TRUE, FALSE, FALSE, FALSE },
|
||||
{"VX", TRUE, TRUE, TRUE, TRUE },
|
||||
{"XT", FALSE, TRUE, TRUE, TRUE },
|
||||
/* Command FT-450 FT-950 FT-2000 FT-9000 FT-5000 */
|
||||
{"AB", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"AC", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"AG", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"AI", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"AM", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"AN", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"BC", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"BD", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"BI", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"BP", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"BS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"BU", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"BY", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"CH", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"CN", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"CO", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"CS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"CT", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"DA", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"DN", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"DP", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"DS", TRUE, FALSE, TRUE, TRUE, TRUE },
|
||||
{"ED", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"EK", FALSE, TRUE, TRUE, TRUE, FALSE },
|
||||
{"EU", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"EX", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"FA", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"FB", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"FK", FALSE, TRUE, TRUE, TRUE, FALSE },
|
||||
{"FR", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"FS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"FT", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"GT", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"ID", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"IF", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"IS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"KM", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"KP", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"KR", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"KS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"KY", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"LK", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"LM", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"MA", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"MC", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"MD", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"MG", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"MK", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"ML", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"MR", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"MS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"MW", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"MX", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"NA", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"NB", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"NL", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"NR", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"OI", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"OS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"PA", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"PB", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"PC", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"PL", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"PR", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"PS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"QI", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"QR", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"QS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"RA", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"RC", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"RD", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"RF", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"RG", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"RI", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"RL", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"RM", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"RO", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"RP", TRUE, FALSE, FALSE, FALSE, FALSE },
|
||||
{"RS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"RT", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"RU", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"SC", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"SD", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"SF", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"SH", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"SM", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"SQ", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"ST", TRUE, FALSE, FALSE, FALSE, FALSE },
|
||||
{"SV", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"TS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"TX", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"UL", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"UP", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"VD", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"VF", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"VG", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"VM", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"VR", TRUE, FALSE, FALSE, FALSE, FALSE },
|
||||
{"VS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"VV", TRUE, FALSE, FALSE, FALSE, FALSE },
|
||||
{"VX", TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||
{"XT", FALSE, TRUE, TRUE, TRUE, TRUE },
|
||||
};
|
||||
int valid_commands_count = sizeof(valid_commands) / sizeof(yaesu_newcat_commands_t);
|
||||
|
||||
|
@ -534,7 +533,9 @@ int newcat_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
|
||||
/* FT9000 RIG_TARGETABLE_MODE (mode and width) */
|
||||
/* FT2000 mode only */
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
priv->cmd_str[2] = (RIG_VFO_B == vfo) ? '1' : '0';
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"%s: generic mode = %x \n",
|
||||
|
@ -616,7 +617,9 @@ int newcat_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
main_sub_vfo = RIG_VFO_B == vfo ? '1' : '0';
|
||||
|
||||
/* Build the command string */
|
||||
|
@ -1024,7 +1027,9 @@ int newcat_set_rptr_shift(RIG * rig, vfo_t vfo, rptr_shift_t rptr_shift)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
main_sub_vfo = RIG_VFO_B == vfo ? '1' : '0';
|
||||
|
||||
switch (rptr_shift) {
|
||||
|
@ -1071,7 +1076,9 @@ int newcat_get_rptr_shift(RIG * rig, vfo_t vfo, rptr_shift_t * rptr_shift)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0';
|
||||
|
||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c%c", command, main_sub_vfo, cat_term);
|
||||
|
@ -1543,7 +1550,9 @@ int newcat_set_ctcss_tone(RIG * rig, vfo_t vfo, tone_t tone)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0';
|
||||
|
||||
for (i = 0, tone_match = FALSE; rig->caps->ctcss_list[i] != 0; i++)
|
||||
|
@ -1592,7 +1601,9 @@ int newcat_get_ctcss_tone(RIG * rig, vfo_t vfo, tone_t * tone)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0';
|
||||
|
||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c%c", cmd, main_sub_vfo, cat_term);
|
||||
|
@ -1734,6 +1745,11 @@ int newcat_power2mW(RIG * rig, unsigned int *mwpower, float power, freq_t freq,
|
|||
*mwpower = power * 200000;
|
||||
rig_debug(RIG_DEBUG_TRACE, "case FT2000D - rig_id = %d, *mwpower = %d\n", rig_id, *mwpower);
|
||||
break;
|
||||
case NC_RIGID_FTDX5000:
|
||||
/* 200 Watts */
|
||||
*mwpower = power * 200000;
|
||||
rig_debug(RIG_DEBUG_TRACE, "case FTDX5000 - rig_id = %d, *mwpower = %d\n", rig_id, *mwpower);
|
||||
break;
|
||||
case NC_RIGID_FTDX9000D:
|
||||
/* 200 Watts */
|
||||
*mwpower = power * 200000;
|
||||
|
@ -1788,6 +1804,11 @@ int newcat_mW2power(RIG * rig, float *power, unsigned int mwpower, freq_t freq,
|
|||
*power = mwpower / 200000.0;
|
||||
rig_debug(RIG_DEBUG_TRACE, "case FT2000D - rig_id = %d, *power = %f\n", rig_id, *power);
|
||||
break;
|
||||
case NC_RIGID_FTDX5000:
|
||||
/* 200 Watts */
|
||||
*power = mwpower / 200000.0;
|
||||
rig_debug(RIG_DEBUG_TRACE, "case FTDX5000 - rig_id = %d, *power = %f\n", rig_id, *power);
|
||||
break;
|
||||
case NC_RIGID_FTDX9000D:
|
||||
/* 200 Watts */
|
||||
*power = mwpower / 200000.0;
|
||||
|
@ -1963,7 +1984,7 @@ int newcat_set_ant(RIG * rig, vfo_t vfo, ant_t ant)
|
|||
case RIG_ANT_5:
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT950))
|
||||
return -RIG_EINVAL;
|
||||
/* RX only, on FT-2000/FT-9000 */
|
||||
/* RX only, on FT-2000/FT-5000/FT-9000 */
|
||||
which_ant = '5';
|
||||
break;
|
||||
default:
|
||||
|
@ -2076,7 +2097,9 @@ int newcat_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
|||
return err;
|
||||
|
||||
/* Start with both but mostly FT9000 */
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0';
|
||||
|
||||
switch (level) {
|
||||
|
@ -2251,7 +2274,9 @@ int newcat_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
|||
val.i = 30;
|
||||
if (val.i > 3000)
|
||||
val.i = 3000;
|
||||
} else if (newcat_is_rig(rig, RIG_MODEL_FT2000) || newcat_is_rig(rig, RIG_MODEL_FT9000)) {
|
||||
} else if (newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000)) {
|
||||
if (val.i < 1)
|
||||
val.i = 1;
|
||||
if (val.i > 5000)
|
||||
|
@ -2275,7 +2300,9 @@ int newcat_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
|||
val.i = 30;
|
||||
if (val.i > 3000)
|
||||
val.i =3000;
|
||||
} else if (newcat_is_rig(rig, RIG_MODEL_FT2000) || newcat_is_rig(rig, RIG_MODEL_FT9000)) {
|
||||
} else if (newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000)) {
|
||||
if (val.i < 0)
|
||||
val.i = 0;
|
||||
if (val.i > 5000)
|
||||
|
@ -2347,7 +2374,9 @@ int newcat_get_level(RIG * rig, vfo_t vfo, setting_t level, value_t * val)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0';
|
||||
|
||||
switch (level) {
|
||||
|
@ -2618,7 +2647,9 @@ int newcat_set_func(RIG * rig, vfo_t vfo, setting_t func, int status)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0';
|
||||
|
||||
switch (func) {
|
||||
|
@ -3083,7 +3114,9 @@ int newcat_vfo_op(RIG * rig, vfo_t vfo, vfo_op_t op)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0';
|
||||
|
||||
switch (op) {
|
||||
|
@ -3588,6 +3621,7 @@ ncboolean newcat_valid_command(RIG *rig, char *command) {
|
|||
ncboolean is_ft950;
|
||||
ncboolean is_ft2000;
|
||||
ncboolean is_ft9000;
|
||||
ncboolean is_ft5000;
|
||||
int search_high;
|
||||
int search_index;
|
||||
int search_low;
|
||||
|
@ -3615,9 +3649,10 @@ ncboolean newcat_valid_command(RIG *rig, char *command) {
|
|||
is_ft950 = newcat_is_rig(rig, RIG_MODEL_FT950);
|
||||
is_ft2000 = newcat_is_rig(rig, RIG_MODEL_FT2000);
|
||||
is_ft9000 = newcat_is_rig(rig, RIG_MODEL_FT9000);
|
||||
is_ft5000 = newcat_is_rig(rig, RIG_MODEL_FTDX5000);
|
||||
|
||||
|
||||
if (!is_ft450 && !is_ft950 && !is_ft2000 && !is_ft9000) {
|
||||
if (!is_ft450 && !is_ft950 && !is_ft2000 && !is_ft5000 && !is_ft9000) {
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: '%s' is unknown\n",
|
||||
__func__, caps->model_name);
|
||||
return FALSE;
|
||||
|
@ -3649,6 +3684,8 @@ ncboolean newcat_valid_command(RIG *rig, char *command) {
|
|||
return TRUE;
|
||||
else if (is_ft2000 && valid_commands[search_index].ft2000)
|
||||
return TRUE;
|
||||
else if (is_ft5000 && valid_commands[search_index].ft5000)
|
||||
return TRUE;
|
||||
else if (is_ft9000 && valid_commands[search_index].ft9000)
|
||||
return TRUE;
|
||||
else {
|
||||
|
@ -3875,7 +3912,9 @@ int newcat_set_narrow(RIG * rig, vfo_t vfo, ncboolean narrow)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0';
|
||||
|
||||
if (narrow == TRUE)
|
||||
|
@ -3914,7 +3953,9 @@ int newcat_get_narrow(RIG * rig, vfo_t vfo, ncboolean * narrow)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0';
|
||||
|
||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c%c", command, main_sub_vfo, cat_term);
|
||||
|
@ -3973,7 +4014,9 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0';
|
||||
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT950)) {
|
||||
|
@ -4038,7 +4081,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
} /* end switch(mode) */
|
||||
} /* end if FT950 */
|
||||
else {
|
||||
/* FT450, FT2000, FT9000 */
|
||||
/* FT450, FT2000, FT5000, FT9000 */
|
||||
switch (mode) {
|
||||
case RIG_MODE_PKTUSB:
|
||||
case RIG_MODE_PKTLSB:
|
||||
|
@ -4112,7 +4155,9 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) || newcat_is_rig(rig, RIG_MODEL_FT2000))
|
||||
if (newcat_is_rig(rig, RIG_MODEL_FT9000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
||||
main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0';
|
||||
|
||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c%c", cmd, main_sub_vfo, cat_term);
|
||||
|
@ -4212,7 +4257,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
|
|||
|
||||
} /* end if FT950 */
|
||||
else {
|
||||
/* FT450, FT2000, FT9000 */
|
||||
/* FT450, FT2000, FT5000, FT9000 */
|
||||
switch (mode) {
|
||||
case RIG_MODE_PKTUSB:
|
||||
case RIG_MODE_PKTLSB:
|
||||
|
|
|
@ -96,6 +96,7 @@ DECLARE_INITRIG_BACKEND(yaesu)
|
|||
rig_register(&ft1000mpmkv_caps);
|
||||
rig_register(&ft1000mpmkvfld_caps);
|
||||
rig_register(&ft2000_caps);
|
||||
rig_register(&ftdx5000_caps);
|
||||
rig_register(&ft9000_caps);
|
||||
rig_register(&frg100_caps);
|
||||
rig_register(&frg8800_caps);
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
* 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
|
||||
|
@ -68,6 +67,7 @@ extern const struct rig_caps ft1000mpmkv_caps;
|
|||
extern const struct rig_caps ft1000mpmkvfld_caps;
|
||||
extern const struct rig_caps ft1000d_caps;
|
||||
extern const struct rig_caps ft2000_caps;
|
||||
extern const struct rig_caps ftdx5000_caps;
|
||||
extern const struct rig_caps ft9000_caps;
|
||||
extern const struct rig_caps frg100_caps;
|
||||
extern const struct rig_caps frg8800_caps;
|
||||
|
|
Ładowanie…
Reference in New Issue