kopia lustrzana https://github.com/Hamlib/Hamlib
Submission for new backend model (134) for Yaesu FT-DX1200
All, attached is a git patch for adding the Yaesu FT-DX1200 radio to the yaesu backend as model 134. I am humbly asking for this to be included in hamlib. I've tested this using a 1200 radio, using both rigctl and cqrlog. The ft-dx1200 cat commands are a mix of ft-950 and ft-2000 radio commands, so neither of those models will work correctly with the 1200. It was tested and build against the master branch from github on 4/3/2015, on an Ubuntu 14.04 server. Let me know if you have any questions. thanks Dave kk6df at arrl.net From cc0351fddc245b6223ae6c21dc6e29c5422fc822 Mon Sep 17 00:00:00 2001 From: David Fannin <dfannin@sushisoft.com> Date: Sat, 4 Apr 2015 09:23:49 -0700 Subject: [PATCH 1/2] adding yaesu ft-dx1200 model to yaesu backendHamlib-3.0
rodzic
d22d83122b
commit
699db23393
|
@ -95,6 +95,7 @@
|
||||||
#define RIG_MODEL_FT980 RIG_MAKE_MODEL(RIG_YAESU, 31)
|
#define RIG_MODEL_FT980 RIG_MAKE_MODEL(RIG_YAESU, 31)
|
||||||
#define RIG_MODEL_FTDX5000 RIG_MAKE_MODEL(RIG_YAESU, 32)
|
#define RIG_MODEL_FTDX5000 RIG_MAKE_MODEL(RIG_YAESU, 32)
|
||||||
#define RIG_MODEL_VX1700 RIG_MAKE_MODEL(RIG_YAESU, 33)
|
#define RIG_MODEL_VX1700 RIG_MAKE_MODEL(RIG_YAESU, 33)
|
||||||
|
#define RIG_MODEL_FT1200 RIG_MAKE_MODEL(RIG_YAESU, 34)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Kenwood
|
* Kenwood
|
||||||
|
|
|
@ -9,7 +9,7 @@ YAESUSRC = ft100.c ft100.h ft747.c ft747.h ft817.c ft817.h ft847.c ft847.h \
|
||||||
|
|
||||||
## Yaesu radios that use the new Kenwood style CAT commands
|
## Yaesu radios that use the new Kenwood style CAT commands
|
||||||
NEWCATSRC = newcat.c newcat.h ft450.c ft450.h ft950.c ft950.h ft2000.c \
|
NEWCATSRC = newcat.c newcat.h ft450.c ft450.h ft950.c ft950.h ft2000.c \
|
||||||
ft2000.h ft9000.c ft9000.h ft5000.c ft5000.h
|
ft2000.h ft9000.c ft9000.h ft5000.c ft5000.h ft1200.c ft1200.h
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libhamlib-yaesu.la
|
noinst_LTLIBRARIES = libhamlib-yaesu.la
|
||||||
libhamlib_yaesu_la_SOURCES = $(YAESUSRC) $(NEWCATSRC) yaesu.c yaesu.h
|
libhamlib_yaesu_la_SOURCES = $(YAESUSRC) $(NEWCATSRC) yaesu.c yaesu.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
|
||||||
|
* (C) Terry Embry 2008-2009
|
||||||
|
* ft1200.c - (C) David Fannin 2015 (kk6df at arrl.net)
|
||||||
|
*
|
||||||
|
* This shared library provides an API for communicating
|
||||||
|
* via serial interface to an FT-1200 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 distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#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 "ft1200.h"
|
||||||
|
#include "idx_builtin.h"
|
||||||
|
#include "tones.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ft1200 rigs capabilities.
|
||||||
|
* Also this struct is READONLY!
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
const struct rig_caps ft1200_caps = {
|
||||||
|
.rig_model = RIG_MODEL_FT1200,
|
||||||
|
.model_name = "FT-1200",
|
||||||
|
.mfg_name = "Yaesu",
|
||||||
|
.version = NEWCAT_VER ".1",
|
||||||
|
.copyright = "LGPL",
|
||||||
|
.status = RIG_STATUS_STABLE,
|
||||||
|
.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_HARDWARE,
|
||||||
|
.write_delay = FT1200_WRITE_DELAY,
|
||||||
|
.post_write_delay = FT1200_POST_WRITE_DELAY,
|
||||||
|
.timeout = 2000,
|
||||||
|
.retry = 3,
|
||||||
|
.has_get_func = FT1200_FUNCS,
|
||||||
|
.has_set_func = FT1200_FUNCS,
|
||||||
|
.has_get_level = FT1200_LEVELS,
|
||||||
|
.has_set_level = RIG_LEVEL_SET(FT1200_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 = 10 } },
|
||||||
|
},
|
||||||
|
.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 = FT1200_VFO_OPS,
|
||||||
|
.targetable_vfo = RIG_TARGETABLE_FREQ|RIG_TARGETABLE_MODE,
|
||||||
|
.transceive = RIG_TRN_OFF, /* May enable later as the 1200 has an Auto Info command */
|
||||||
|
.bank_qty = 0,
|
||||||
|
.chan_desc_sz = 0,
|
||||||
|
.str_cal = FT1200_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(56), FT1200_ALL_RX_MODES, -1, -1, FT1200_VFO_ALL, FT1200_TX_ANTS},
|
||||||
|
RIG_FRNG_END,
|
||||||
|
},
|
||||||
|
|
||||||
|
.tx_range_list1 = {
|
||||||
|
FRQ_RNG_HF(1, FT1200_OTHER_TX_MODES, W(5), W(100), FT1200_VFO_ALL, FT1200_TX_ANTS),
|
||||||
|
FRQ_RNG_HF(1, FT1200_AM_TX_MODES, W(2), W(25), FT1200_VFO_ALL, FT1200_TX_ANTS), /* AM class */
|
||||||
|
FRQ_RNG_6m(1, FT1200_OTHER_TX_MODES, W(5), W(100), FT1200_VFO_ALL, FT1200_TX_ANTS),
|
||||||
|
FRQ_RNG_6m(1, FT1200_AM_TX_MODES, W(2), W(25), FT1200_VFO_ALL, FT1200_TX_ANTS), /* AM class */
|
||||||
|
|
||||||
|
RIG_FRNG_END,
|
||||||
|
},
|
||||||
|
|
||||||
|
.rx_range_list2 = {
|
||||||
|
{kHz(30), MHz(56), FT1200_ALL_RX_MODES, -1, -1, FT1200_VFO_ALL, FT1200_TX_ANTS},
|
||||||
|
RIG_FRNG_END,
|
||||||
|
},
|
||||||
|
|
||||||
|
.tx_range_list2 = {
|
||||||
|
FRQ_RNG_HF(2, FT1200_OTHER_TX_MODES, W(5), W(100), FT1200_VFO_ALL, FT1200_TX_ANTS),
|
||||||
|
FRQ_RNG_HF(2, FT1200_AM_TX_MODES, W(2), W(25), FT1200_VFO_ALL, FT1200_TX_ANTS), /* AM class */
|
||||||
|
FRQ_RNG_6m(2, FT1200_OTHER_TX_MODES, W(5), W(100), FT1200_VFO_ALL, FT1200_TX_ANTS),
|
||||||
|
FRQ_RNG_6m(2, FT1200_AM_TX_MODES, W(2), W(25), FT1200_VFO_ALL, FT1200_TX_ANTS), /* AM class */
|
||||||
|
|
||||||
|
RIG_FRNG_END,
|
||||||
|
},
|
||||||
|
|
||||||
|
.tuning_steps = {
|
||||||
|
{FT1200_SSB_CW_RX_MODES, Hz(10)}, /* Normal */
|
||||||
|
{FT1200_SSB_CW_RX_MODES, Hz(100)}, /* Fast */
|
||||||
|
|
||||||
|
{FT1200_AM_RX_MODES, Hz(100)}, /* Normal */
|
||||||
|
{FT1200_AM_RX_MODES, kHz(1)}, /* Fast */
|
||||||
|
|
||||||
|
{FT1200_FM_RX_MODES, Hz(100)}, /* Normal */
|
||||||
|
{FT1200_FM_RX_MODES, kHz(1)}, /* Fast */
|
||||||
|
|
||||||
|
RIG_TS_END,
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/* mode/filter list, .remember = order matters! */
|
||||||
|
.filters = {
|
||||||
|
{FT1200_CW_RTTY_PKT_RX_MODES, Hz(2400)}, /* Normal CW, RTTY, PKT/USER */
|
||||||
|
{FT1200_CW_RTTY_PKT_RX_MODES, Hz(500)}, /* Narrow CW, RTTY, PKT/USER */
|
||||||
|
{FT1200_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(4000)}, /* Wide SSB */
|
||||||
|
{RIG_MODE_AM, Hz(9000)}, /* Normal AM */
|
||||||
|
{RIG_MODE_AM, Hz(6000)}, /* Narrow AM */
|
||||||
|
{FT1200_FM_RX_MODES, Hz(12000)}, /* Normal FM */
|
||||||
|
{FT1200_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,134 @@
|
||||||
|
/*
|
||||||
|
* hamlib - (C) Frank Singleton 2000 (javabear at users.sourceforge.net)
|
||||||
|
*
|
||||||
|
* ft2000.h - (C) Nate Bargmann 2007 (n0nb at arrl.net)
|
||||||
|
* (C) Stephane Fillod 2008
|
||||||
|
*
|
||||||
|
* ft1200.h - (C) David Fannin 2015 (kk6df at arrl.net)
|
||||||
|
* This shared library provides an API for communicating
|
||||||
|
* via serial interface to an FT-1200 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 distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef _FT1200_H
|
||||||
|
#define _FT1200_H 1
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
#define TRUE 1
|
||||||
|
#define FALSE 0
|
||||||
|
#define ON TRUE
|
||||||
|
#define OFF FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define FT1200_VFO_ALL (RIG_VFO_A|RIG_VFO_B)
|
||||||
|
|
||||||
|
/* Receiver caps */
|
||||||
|
|
||||||
|
#define FT1200_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 FT1200_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 FT1200_AM_RX_MODES (RIG_MODE_AM)
|
||||||
|
#define FT1200_FM_RX_MODES (RIG_MODE_FM|RIG_MODE_PKTFM)
|
||||||
|
#define FT1200_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 FT1200_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 FT1200_AM_TX_MODES (RIG_MODE_AM) /* set 25W max */
|
||||||
|
|
||||||
|
/* TBC */
|
||||||
|
#define FT1200_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 FT1200_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 FT1200_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 FT1200_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 FT1200_TX_ANTS (RIG_ANT_1|RIG_ANT_2)
|
||||||
|
|
||||||
|
#define FT1200_MEM_CHNL_LENGTH 1 /* 0x10 P1 = 01 return size */
|
||||||
|
#define FT1200_OP_DATA_LENGTH 19 /* 0x10 P1 = 03 return size */
|
||||||
|
#define FT1200_VFO_DATA_LENGTH 18 /* 0x10 P1 = 03 return size -- A & B returned */
|
||||||
|
#define FT1200_MEM_CHNL_DATA_LENGTH 19 /* 0x10 P1 = 04, P4 = 0x01-0x20 return size */
|
||||||
|
#define FT1200_STATUS_FLAGS_LENGTH 5 /* 0xf7, 0xfa return size */
|
||||||
|
#define FT1200_ALL_DATA_LENGTH 649 /* 0x10 P1 = 00 return size */
|
||||||
|
|
||||||
|
/* Timing values in mS */
|
||||||
|
|
||||||
|
// #define FT2000_PACING_INTERVAL 5
|
||||||
|
// #define FT2000_PACING_DEFAULT_VALUE 0
|
||||||
|
|
||||||
|
/* Delay between bytes sent to FT-2000
|
||||||
|
* Should not exceed value set in CAT TOT menu (rig default is 10 mSec)
|
||||||
|
*/
|
||||||
|
#define FT1200_WRITE_DELAY 0
|
||||||
|
|
||||||
|
|
||||||
|
/* Delay sequential fast writes */
|
||||||
|
|
||||||
|
#define FT1200_POST_WRITE_DELAY 5
|
||||||
|
|
||||||
|
#endif /* _FT1200_H */
|
399
yaesu/newcat.c
399
yaesu/newcat.c
|
@ -5,6 +5,7 @@
|
||||||
* newcat.c - (C) Nate Bargmann 2007 (n0nb at arrl.net)
|
* newcat.c - (C) Nate Bargmann 2007 (n0nb at arrl.net)
|
||||||
* (C) Stephane Fillod 2008-2010
|
* (C) Stephane Fillod 2008-2010
|
||||||
* (C) Terry Embry 2008-2010
|
* (C) Terry Embry 2008-2010
|
||||||
|
* (C) David Fannin (kk6df at arrl.net)
|
||||||
*
|
*
|
||||||
* This shared library provides an API for communicating
|
* This shared library provides an API for communicating
|
||||||
* via serial interface to any newer Yaesu radio using the
|
* via serial interface to any newer Yaesu radio using the
|
||||||
|
@ -59,6 +60,7 @@ typedef enum nc_rigid_e {
|
||||||
NC_RIGID_FT950 = 310,
|
NC_RIGID_FT950 = 310,
|
||||||
NC_RIGID_FT2000 = 251,
|
NC_RIGID_FT2000 = 251,
|
||||||
NC_RIGID_FT2000D = 252,
|
NC_RIGID_FT2000D = 252,
|
||||||
|
NC_RIGID_FT1200 = 583,
|
||||||
NC_RIGID_FTDX9000D = 101,
|
NC_RIGID_FTDX9000D = 101,
|
||||||
NC_RIGID_FTDX9000Contest = 102,
|
NC_RIGID_FTDX9000Contest = 102,
|
||||||
NC_RIGID_FTDX9000MP = 103,
|
NC_RIGID_FTDX9000MP = 103,
|
||||||
|
@ -78,6 +80,7 @@ typedef struct _yaesu_newcat_commands {
|
||||||
ncboolean ft2000;
|
ncboolean ft2000;
|
||||||
ncboolean ft9000;
|
ncboolean ft9000;
|
||||||
ncboolean ft5000;
|
ncboolean ft5000;
|
||||||
|
ncboolean ft1200;
|
||||||
} yaesu_newcat_commands_t;
|
} yaesu_newcat_commands_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -97,109 +100,112 @@ typedef struct _yaesu_newcat_commands {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static const yaesu_newcat_commands_t valid_commands[] = {
|
static const yaesu_newcat_commands_t valid_commands[] = {
|
||||||
/* Command FT-450 FT-950 FT-2000 FT-9000 FT-5000 */
|
/* Command FT-450 FT-950 FT-2000 FT-9000 FT-5000 FT-1200*/
|
||||||
{"AB", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"AB", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"AC", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"AC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"AG", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"AG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"AI", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"AI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"AM", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"AM", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"AN", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"AN", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"BC", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"BA", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE },
|
||||||
{"BD", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"BC", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"BI", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"BD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"BP", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"BI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"BS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"BP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"BU", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"BS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"BY", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"BU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"CH", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"BY", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"CN", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"CH", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"CO", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"CN", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"CS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"CO", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"CT", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"CS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"DA", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"CT", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"DN", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"DA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"DP", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"DN", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"DS", TRUE, FALSE, TRUE, TRUE, TRUE },
|
{"DT", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE },
|
||||||
{"ED", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"DP", FALSE, TRUE, TRUE, TRUE, TRUE, FALSE },
|
||||||
{"EK", FALSE, TRUE, TRUE, TRUE, FALSE },
|
{"DS", TRUE, FALSE, TRUE, TRUE, TRUE, FALSE },
|
||||||
{"EU", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"ED", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"EX", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"EK", FALSE, TRUE, TRUE, TRUE, FALSE, TRUE },
|
||||||
{"FA", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"EN", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE },
|
||||||
{"FB", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"EU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"FK", FALSE, TRUE, TRUE, TRUE, FALSE },
|
{"EX", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"FR", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"FA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"FS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"FB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"FT", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"FK", FALSE, TRUE, TRUE, TRUE, FALSE, FALSE },
|
||||||
{"GT", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"FR", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"ID", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"FS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"IF", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"FT", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"IS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"GT", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"KM", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"ID", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"KP", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"IF", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"KR", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"IS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"KS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"KM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"KY", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"KP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"LK", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"KR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"LM", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"KS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"MA", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"KY", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"MC", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"LK", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"MD", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"LM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"MG", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"MA", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"MK", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"MC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"ML", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"MD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"MR", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"MG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"MS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"MK", TRUE, TRUE, TRUE, TRUE, TRUE, FALSE },
|
||||||
{"MW", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"ML", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"MX", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"MR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"NA", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"MS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"NB", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"MW", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"NL", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"MX", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"NR", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"NA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"OI", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"NB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"OS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"NL", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"PA", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"NR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"PB", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"OI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"PC", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"OS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"PL", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"PA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"PR", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"PB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"PS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"PC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"QI", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"PL", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"QR", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"PR", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"QS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"PS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"RA", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"QI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"RC", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"QR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"RD", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"QS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"RF", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"RA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"RG", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"RC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"RI", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"RD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"RL", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"RF", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"RM", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"RG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"RO", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"RI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"RP", TRUE, FALSE, FALSE, FALSE, FALSE },
|
{"RL", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"RS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"RM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"RT", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"RO", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"RU", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"RP", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE },
|
||||||
{"SC", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"RS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"SD", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"RT", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"SF", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"RU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"SH", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"SC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"SM", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"SD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"SQ", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"SF", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"ST", TRUE, FALSE, FALSE, FALSE, FALSE },
|
{"SH", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"SV", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"SM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"TS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"SQ", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"TX", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"ST", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE },
|
||||||
{"UL", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"SV", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"UP", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"TS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"VD", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"TX", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"VF", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"UL", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"VG", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"UP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"VM", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"VD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"VR", TRUE, FALSE, FALSE, FALSE, FALSE },
|
{"VF", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"VS", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"VG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"VV", TRUE, FALSE, FALSE, FALSE, FALSE },
|
{"VM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
{"VX", TRUE, TRUE, TRUE, TRUE, TRUE },
|
{"VR", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE },
|
||||||
{"XT", FALSE, TRUE, TRUE, TRUE, TRUE },
|
{"VS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
|
{"VV", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE },
|
||||||
|
{"VX", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
|
{"XT", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE },
|
||||||
};
|
};
|
||||||
int valid_commands_count = sizeof(valid_commands) / sizeof(yaesu_newcat_commands_t);
|
int valid_commands_count = sizeof(valid_commands) / sizeof(yaesu_newcat_commands_t);
|
||||||
|
|
||||||
|
@ -1588,6 +1594,11 @@ int newcat_power2mW(RIG * rig, unsigned int *mwpower, float power, freq_t freq,
|
||||||
*mwpower = power * 400000;
|
*mwpower = power * 400000;
|
||||||
rig_debug(RIG_DEBUG_TRACE, "case FTDX9000MP - rig_id = %d, *mwpower = %d\n", rig_id, *mwpower);
|
rig_debug(RIG_DEBUG_TRACE, "case FTDX9000MP - rig_id = %d, *mwpower = %d\n", rig_id, *mwpower);
|
||||||
break;
|
break;
|
||||||
|
case NC_RIGID_FT1200:
|
||||||
|
/* 100 Watts */
|
||||||
|
*mwpower = power * 100000;
|
||||||
|
rig_debug(RIG_DEBUG_TRACE, "case FT1200 - rig_id = %d, *mwpower = %d\n", rig_id, *mwpower);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
/* 100 Watts */
|
/* 100 Watts */
|
||||||
*mwpower = power * 100000;
|
*mwpower = power * 100000;
|
||||||
|
@ -1647,6 +1658,11 @@ int newcat_mW2power(RIG * rig, float *power, unsigned int mwpower, freq_t freq,
|
||||||
*power = mwpower / 400000.0;
|
*power = mwpower / 400000.0;
|
||||||
rig_debug(RIG_DEBUG_TRACE, "case FTDX9000MP - rig_id = %d, *power = %f\n", rig_id, *power);
|
rig_debug(RIG_DEBUG_TRACE, "case FTDX9000MP - rig_id = %d, *power = %f\n", rig_id, *power);
|
||||||
break;
|
break;
|
||||||
|
case NC_RIGID_FT1200:
|
||||||
|
/* 100 Watts */
|
||||||
|
*power = mwpower / 100000.0;
|
||||||
|
rig_debug(RIG_DEBUG_TRACE, "case FT1200 - rig_id = %d, *power = %f\n", rig_id, *power);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
/* 100 Watts */
|
/* 100 Watts */
|
||||||
*power = mwpower / 100000.0;
|
*power = mwpower / 100000.0;
|
||||||
|
@ -1771,16 +1787,22 @@ int newcat_set_ant(RIG * rig, vfo_t vfo, ant_t ant)
|
||||||
case RIG_ANT_3:
|
case RIG_ANT_3:
|
||||||
if (newcat_is_rig(rig, RIG_MODEL_FT950)) /* FT2000 also */
|
if (newcat_is_rig(rig, RIG_MODEL_FT950)) /* FT2000 also */
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
|
if (newcat_is_rig(rig, RIG_MODEL_FT1200)) /* FT2000 also */
|
||||||
|
return -RIG_EINVAL;
|
||||||
which_ant = '3';
|
which_ant = '3';
|
||||||
break;
|
break;
|
||||||
case RIG_ANT_4:
|
case RIG_ANT_4:
|
||||||
if (newcat_is_rig(rig, RIG_MODEL_FT950))
|
if (newcat_is_rig(rig, RIG_MODEL_FT950))
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
|
if (newcat_is_rig(rig, RIG_MODEL_FT1200))
|
||||||
|
return -RIG_EINVAL;
|
||||||
which_ant = '4';
|
which_ant = '4';
|
||||||
break;
|
break;
|
||||||
case RIG_ANT_5:
|
case RIG_ANT_5:
|
||||||
if (newcat_is_rig(rig, RIG_MODEL_FT950))
|
if (newcat_is_rig(rig, RIG_MODEL_FT950))
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
|
if (newcat_is_rig(rig, RIG_MODEL_FT1200))
|
||||||
|
return -RIG_EINVAL;
|
||||||
/* RX only, on FT-2000/FT-5000/FT-9000 */
|
/* RX only, on FT-2000/FT-5000/FT-9000 */
|
||||||
which_ant = '5';
|
which_ant = '5';
|
||||||
break;
|
break;
|
||||||
|
@ -1877,6 +1899,7 @@ int newcat_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
||||||
if (!newcat_valid_command(rig, "PC"))
|
if (!newcat_valid_command(rig, "PC"))
|
||||||
return -RIG_ENAVAIL;
|
return -RIG_ENAVAIL;
|
||||||
scale = (newcat_is_rig(rig, RIG_MODEL_FT950)) ? 100 : 255;
|
scale = (newcat_is_rig(rig, RIG_MODEL_FT950)) ? 100 : 255;
|
||||||
|
scale = (newcat_is_rig(rig, RIG_MODEL_FT1200)) ? 100 : scale;
|
||||||
fpf = newcat_scale_float(scale, val.f);
|
fpf = newcat_scale_float(scale, val.f);
|
||||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PC%03d%c", fpf, cat_term);
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PC%03d%c", fpf, cat_term);
|
||||||
break;
|
break;
|
||||||
|
@ -1931,6 +1954,9 @@ int newcat_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
||||||
case RIG_LEVEL_MICGAIN:
|
case RIG_LEVEL_MICGAIN:
|
||||||
if (!newcat_valid_command(rig, "MG"))
|
if (!newcat_valid_command(rig, "MG"))
|
||||||
return -RIG_ENAVAIL;
|
return -RIG_ENAVAIL;
|
||||||
|
if (newcat_is_rig(rig, RIG_MODEL_FT1200))
|
||||||
|
fpf = newcat_scale_float(100, val.f);
|
||||||
|
else
|
||||||
fpf = newcat_scale_float(255, val.f);
|
fpf = newcat_scale_float(255, val.f);
|
||||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MG%03d%c", fpf, cat_term);
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MG%03d%c", fpf, cat_term);
|
||||||
break;
|
break;
|
||||||
|
@ -2027,6 +2053,7 @@ int newcat_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
||||||
if (!newcat_valid_command(rig, "PL"))
|
if (!newcat_valid_command(rig, "PL"))
|
||||||
return -RIG_ENAVAIL;
|
return -RIG_ENAVAIL;
|
||||||
scale = (newcat_is_rig(rig, RIG_MODEL_FT950)) ? 100 : 255;
|
scale = (newcat_is_rig(rig, RIG_MODEL_FT950)) ? 100 : 255;
|
||||||
|
scale = (newcat_is_rig(rig, RIG_MODEL_FT1200)) ? 100 : scale ;
|
||||||
fpf = newcat_scale_float(scale, val.f);
|
fpf = newcat_scale_float(scale, val.f);
|
||||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PL%03d%c", fpf, cat_term);
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PL%03d%c", fpf, cat_term);
|
||||||
break;
|
break;
|
||||||
|
@ -2039,7 +2066,7 @@ int newcat_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
||||||
if (val.i < 1)
|
if (val.i < 1)
|
||||||
val.i = 1;
|
val.i = 1;
|
||||||
val.i = 5000 / val.i;
|
val.i = 5000 / val.i;
|
||||||
if (newcat_is_rig(rig, RIG_MODEL_FT950) || newcat_is_rig(rig, RIG_MODEL_FT450)) {
|
if (newcat_is_rig(rig, RIG_MODEL_FT950) || newcat_is_rig(rig, RIG_MODEL_FT450) || newcat_is_rig(rig, RIG_MODEL_FT1200)) {
|
||||||
if (val.i < 30)
|
if (val.i < 30)
|
||||||
val.i = 30;
|
val.i = 30;
|
||||||
if (val.i > 3000)
|
if (val.i > 3000)
|
||||||
|
@ -2065,7 +2092,7 @@ int newcat_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
||||||
return -RIG_ENAVAIL;
|
return -RIG_ENAVAIL;
|
||||||
/* VOX delay, arg int (tenth of seconds), 100ms UI */
|
/* VOX delay, arg int (tenth of seconds), 100ms UI */
|
||||||
val.i = val.i * 100;
|
val.i = val.i * 100;
|
||||||
if (newcat_is_rig(rig, RIG_MODEL_FT950) || newcat_is_rig(rig, RIG_MODEL_FT450)) {
|
if (newcat_is_rig(rig, RIG_MODEL_FT950) || newcat_is_rig(rig, RIG_MODEL_FT450) || newcat_is_rig(rig,RIG_MODEL_FT1200)) {
|
||||||
if (val.i < 100) /* min is 30ms but spec is 100ms Unit Intervals */
|
if (val.i < 100) /* min is 30ms but spec is 100ms Unit Intervals */
|
||||||
val.i = 30;
|
val.i = 30;
|
||||||
if (val.i > 3000)
|
if (val.i > 3000)
|
||||||
|
@ -2084,6 +2111,7 @@ int newcat_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
||||||
if (!newcat_valid_command(rig, "VG"))
|
if (!newcat_valid_command(rig, "VG"))
|
||||||
return -RIG_ENAVAIL;
|
return -RIG_ENAVAIL;
|
||||||
scale = (newcat_is_rig(rig, RIG_MODEL_FT950)) ? 100 : 255;
|
scale = (newcat_is_rig(rig, RIG_MODEL_FT950)) ? 100 : 255;
|
||||||
|
scale = (newcat_is_rig(rig, RIG_MODEL_FT1200)) ? 100 : scale;
|
||||||
fpf = newcat_scale_float(scale, val.f);
|
fpf = newcat_scale_float(scale, val.f);
|
||||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VG%03d%c", fpf, cat_term);
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VG%03d%c", fpf, cat_term);
|
||||||
break;
|
break;
|
||||||
|
@ -2091,6 +2119,9 @@ int newcat_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val)
|
||||||
if (newcat_is_rig(rig, RIG_MODEL_FT950)) {
|
if (newcat_is_rig(rig, RIG_MODEL_FT950)) {
|
||||||
fpf = newcat_scale_float(100, val.f);
|
fpf = newcat_scale_float(100, val.f);
|
||||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "EX117%03d%c", fpf, cat_term);
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "EX117%03d%c", fpf, cat_term);
|
||||||
|
} else if (newcat_is_rig(rig, RIG_MODEL_FT1200)) {
|
||||||
|
fpf = newcat_scale_float(100, val.f);
|
||||||
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "EX183%03d%c", fpf, cat_term);
|
||||||
} else
|
} else
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
break;
|
break;
|
||||||
|
@ -2267,6 +2298,8 @@ int newcat_get_level(RIG * rig, vfo_t vfo, setting_t level, value_t * val)
|
||||||
case RIG_LEVEL_ANTIVOX:
|
case RIG_LEVEL_ANTIVOX:
|
||||||
if (newcat_is_rig(rig, RIG_MODEL_FT950)) {
|
if (newcat_is_rig(rig, RIG_MODEL_FT950)) {
|
||||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "EX117%c", cat_term);
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "EX117%c", cat_term);
|
||||||
|
} else if (newcat_is_rig(rig, RIG_MODEL_FT1200)) {
|
||||||
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "EX183%c", cat_term);
|
||||||
} else
|
} else
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
break;
|
break;
|
||||||
|
@ -2299,6 +2332,7 @@ int newcat_get_level(RIG * rig, vfo_t vfo, setting_t level, value_t * val)
|
||||||
case RIG_LEVEL_COMP:
|
case RIG_LEVEL_COMP:
|
||||||
case RIG_LEVEL_ANTIVOX:
|
case RIG_LEVEL_ANTIVOX:
|
||||||
scale = (newcat_is_rig(rig, RIG_MODEL_FT950)) ? 100. : 255.;
|
scale = (newcat_is_rig(rig, RIG_MODEL_FT950)) ? 100. : 255.;
|
||||||
|
scale = (newcat_is_rig(rig, RIG_MODEL_FT1200)) ? 100. : scale ;
|
||||||
val->f = (float)atoi(retlvl)/scale;
|
val->f = (float)atoi(retlvl)/scale;
|
||||||
break;
|
break;
|
||||||
case RIG_LEVEL_AF:
|
case RIG_LEVEL_AF:
|
||||||
|
@ -3249,6 +3283,7 @@ ncboolean newcat_valid_command(RIG *rig, char *command) {
|
||||||
ncboolean is_ft2000;
|
ncboolean is_ft2000;
|
||||||
ncboolean is_ft9000;
|
ncboolean is_ft9000;
|
||||||
ncboolean is_ft5000;
|
ncboolean is_ft5000;
|
||||||
|
ncboolean is_ft1200;
|
||||||
int search_high;
|
int search_high;
|
||||||
int search_index;
|
int search_index;
|
||||||
int search_low;
|
int search_low;
|
||||||
|
@ -3277,9 +3312,10 @@ ncboolean newcat_valid_command(RIG *rig, char *command) {
|
||||||
is_ft2000 = newcat_is_rig(rig, RIG_MODEL_FT2000);
|
is_ft2000 = newcat_is_rig(rig, RIG_MODEL_FT2000);
|
||||||
is_ft9000 = newcat_is_rig(rig, RIG_MODEL_FT9000);
|
is_ft9000 = newcat_is_rig(rig, RIG_MODEL_FT9000);
|
||||||
is_ft5000 = newcat_is_rig(rig, RIG_MODEL_FTDX5000);
|
is_ft5000 = newcat_is_rig(rig, RIG_MODEL_FTDX5000);
|
||||||
|
is_ft1200 = newcat_is_rig(rig, RIG_MODEL_FT1200);
|
||||||
|
|
||||||
|
|
||||||
if (!is_ft450 && !is_ft950 && !is_ft2000 && !is_ft5000 && !is_ft9000) {
|
if (!is_ft450 && !is_ft950 && !is_ft2000 && !is_ft5000 && !is_ft9000 & !is_ft1200 ) {
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: '%s' is unknown\n",
|
rig_debug(RIG_DEBUG_ERR, "%s: '%s' is unknown\n",
|
||||||
__func__, caps->model_name);
|
__func__, caps->model_name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -3315,6 +3351,8 @@ ncboolean newcat_valid_command(RIG *rig, char *command) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else if (is_ft9000 && valid_commands[search_index].ft9000)
|
else if (is_ft9000 && valid_commands[search_index].ft9000)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
else if (is_ft1200 && valid_commands[search_index].ft1200)
|
||||||
|
return TRUE;
|
||||||
else {
|
else {
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: '%s' command '%s' not supported\n",
|
rig_debug(RIG_DEBUG_TRACE, "%s: '%s' command '%s' not supported\n",
|
||||||
__func__, caps->model_name, command);
|
__func__, caps->model_name, command);
|
||||||
|
@ -3379,7 +3417,8 @@ int newcat_set_tx_vfo(RIG * rig, vfo_t tx_vfo) {
|
||||||
either) */
|
either) */
|
||||||
if (newcat_is_rig(rig, RIG_MODEL_FT950) ||
|
if (newcat_is_rig(rig, RIG_MODEL_FT950) ||
|
||||||
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
newcat_is_rig(rig, RIG_MODEL_FT2000) ||
|
||||||
newcat_is_rig(rig, RIG_MODEL_FTDX5000))
|
newcat_is_rig(rig, RIG_MODEL_FTDX5000) ||
|
||||||
|
newcat_is_rig(rig, RIG_MODEL_FT1200))
|
||||||
p1 = p1 + 2; /* use non-Toggle commands */
|
p1 = p1 + 2; /* use non-Toggle commands */
|
||||||
|
|
||||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c%c", "FT", p1, cat_term);
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c%c", "FT", p1, cat_term);
|
||||||
|
@ -3651,7 +3690,77 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
} /* end switch(mode) */
|
} /* end switch(mode) */
|
||||||
} /* end if FT950 */
|
} /* end if FT950 */
|
||||||
else {
|
else if (newcat_is_rig(rig, RIG_MODEL_FT1200)) {
|
||||||
|
switch (mode) {
|
||||||
|
case RIG_MODE_PKTUSB:
|
||||||
|
case RIG_MODE_PKTLSB:
|
||||||
|
case RIG_MODE_RTTY:
|
||||||
|
case RIG_MODE_RTTYR:
|
||||||
|
case RIG_MODE_CW:
|
||||||
|
case RIG_MODE_CWR:
|
||||||
|
switch (width) {
|
||||||
|
case 2400: snprintf(width_str, sizeof(width_str), "16"); narrow = '0'; break; /* wide */
|
||||||
|
case 2000: snprintf(width_str, sizeof(width_str), "15"); narrow = '0'; break; /* wide */
|
||||||
|
case 1700: snprintf(width_str, sizeof(width_str), "14"); narrow = '0'; break;
|
||||||
|
case 1400: snprintf(width_str, sizeof(width_str), "13"); narrow = '0'; break;
|
||||||
|
case 1200: snprintf(width_str, sizeof(width_str), "12"); narrow = '0'; break;
|
||||||
|
case 800: snprintf(width_str, sizeof(width_str), "11"); narrow = '0'; break;
|
||||||
|
case 500: snprintf(width_str, sizeof(width_str), "10"); narrow = '1'; break;
|
||||||
|
case 450: snprintf(width_str, sizeof(width_str), "09"); narrow = '1'; break;
|
||||||
|
case 400: snprintf(width_str, sizeof(width_str), "08"); narrow = '1'; break;
|
||||||
|
case 350: snprintf(width_str, sizeof(width_str), "07"); narrow = '1'; break;
|
||||||
|
case 300: snprintf(width_str, sizeof(width_str), "06"); narrow = '1'; break;
|
||||||
|
case 250: snprintf(width_str, sizeof(width_str), "05"); narrow = '1'; break;
|
||||||
|
case 200: snprintf(width_str, sizeof(width_str), "04"); narrow = '1'; break;
|
||||||
|
case 150: snprintf(width_str, sizeof(width_str), "03"); narrow = '1'; break;
|
||||||
|
case 100: snprintf(width_str, sizeof(width_str), "02"); narrow = '1'; break;
|
||||||
|
case 50: snprintf(width_str, sizeof(width_str), "01"); narrow = '1'; break;
|
||||||
|
default: return -RIG_EINVAL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RIG_MODE_LSB:
|
||||||
|
case RIG_MODE_USB:
|
||||||
|
switch (width) {
|
||||||
|
case 2300: snprintf(width_str, sizeof(width_str), "13"); narrow = '0'; break; /* normal */
|
||||||
|
case 1800: snprintf(width_str, sizeof(width_str), "09"); narrow = '0'; break; /* narrow */
|
||||||
|
case 3000: snprintf(width_str, sizeof(width_str), "20"); narrow = '0'; break; /* wide */
|
||||||
|
case 3200: snprintf(width_str, sizeof(width_str), "21"); narrow = '0'; break; /* wide */
|
||||||
|
case 3400: snprintf(width_str, sizeof(width_str), "22"); narrow = '0'; break; /* wide */
|
||||||
|
case 3600: snprintf(width_str, sizeof(width_str), "23"); narrow = '0'; break; /* wide */
|
||||||
|
case 3800: snprintf(width_str, sizeof(width_str), "24"); narrow = '0'; break; /* wide */
|
||||||
|
case 4000: snprintf(width_str, sizeof(width_str), "25"); narrow = '0'; break; /* wide */
|
||||||
|
case 2900: snprintf(width_str, sizeof(width_str), "19"); narrow = '0'; break;
|
||||||
|
case 2800: snprintf(width_str, sizeof(width_str), "18"); narrow = '0'; break;
|
||||||
|
case 2700: snprintf(width_str, sizeof(width_str), "17"); narrow = '0'; break;
|
||||||
|
case 2600: snprintf(width_str, sizeof(width_str), "16"); narrow = '0'; break;
|
||||||
|
case 2500: snprintf(width_str, sizeof(width_str), "15"); narrow = '0'; break;
|
||||||
|
case 2400: snprintf(width_str, sizeof(width_str), "14"); narrow = '0'; break;
|
||||||
|
case 2200: snprintf(width_str, sizeof(width_str), "12"); narrow = '0'; break;
|
||||||
|
case 2100: snprintf(width_str, sizeof(width_str), "11"); narrow = '0'; break;
|
||||||
|
case 1950: snprintf(width_str, sizeof(width_str), "10"); narrow = '0'; break;
|
||||||
|
case 1650: snprintf(width_str, sizeof(width_str), "08"); narrow = '1'; break;
|
||||||
|
case 1500: snprintf(width_str, sizeof(width_str), "07"); narrow = '1'; break;
|
||||||
|
case 1350: snprintf(width_str, sizeof(width_str), "06"); narrow = '1'; break;
|
||||||
|
case 1100: snprintf(width_str, sizeof(width_str), "05"); narrow = '1'; break;
|
||||||
|
case 850: snprintf(width_str, sizeof(width_str), "04"); narrow = '1'; break;
|
||||||
|
case 600: snprintf(width_str, sizeof(width_str), "03"); narrow = '1'; break;
|
||||||
|
case 400: snprintf(width_str, sizeof(width_str), "02"); narrow = '1'; break;
|
||||||
|
case 200: snprintf(width_str, sizeof(width_str), "01"); narrow = '1'; break;
|
||||||
|
default: return -RIG_EINVAL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RIG_MODE_AM:
|
||||||
|
case RIG_MODE_FM:
|
||||||
|
case RIG_MODE_PKTFM:
|
||||||
|
if (width < rig_passband_normal(rig, mode))
|
||||||
|
err = newcat_set_narrow(rig, vfo, TRUE);
|
||||||
|
else
|
||||||
|
err = newcat_set_narrow(rig, vfo, FALSE);
|
||||||
|
return err;
|
||||||
|
default:
|
||||||
|
return -RIG_EINVAL;
|
||||||
|
} /* end switch(mode) */
|
||||||
|
} else { /* end if FT1200 */
|
||||||
/* FT450, FT2000, FT5000, FT9000 */
|
/* FT450, FT2000, FT5000, FT9000 */
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case RIG_MODE_PKTUSB:
|
case RIG_MODE_PKTUSB:
|
||||||
|
@ -3687,7 +3796,8 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
||||||
default:
|
default:
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
} /* end switch(mode) */
|
} /* end switch(mode) */
|
||||||
} /* end else */
|
}
|
||||||
|
/* end else */
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_TRACE, "sizeof(width_str) = %d\n", sizeof(width_str) );
|
rig_debug(RIG_DEBUG_TRACE, "sizeof(width_str) = %d\n", sizeof(width_str) );
|
||||||
|
|
||||||
|
@ -3801,7 +3911,76 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
|
||||||
} /* end switch(mode) */
|
} /* end switch(mode) */
|
||||||
|
|
||||||
} /* end if FT950 */
|
} /* end if FT950 */
|
||||||
else {
|
else if (newcat_is_rig(rig, RIG_MODEL_FT1200)) {
|
||||||
|
switch (mode) {
|
||||||
|
case RIG_MODE_PKTUSB:
|
||||||
|
case RIG_MODE_PKTLSB:
|
||||||
|
case RIG_MODE_RTTY:
|
||||||
|
case RIG_MODE_RTTYR:
|
||||||
|
case RIG_MODE_CW:
|
||||||
|
case RIG_MODE_CWR:
|
||||||
|
switch (w) {
|
||||||
|
case 0:
|
||||||
|
case 10: *width = 500; break; /* narrow */
|
||||||
|
case 16: *width = 2400; break; /* wide */
|
||||||
|
case 15: *width = 2000; break; /* wide */
|
||||||
|
case 14: *width = 1700; break; /* wide */
|
||||||
|
case 13: *width = 1400; break; /* wide */
|
||||||
|
case 12: *width = 1200; break;
|
||||||
|
case 11: *width = 800; break;
|
||||||
|
case 9: *width = 450; break;
|
||||||
|
case 8: *width = 400; break;
|
||||||
|
case 7: *width = 350; break;
|
||||||
|
case 6: *width = 300; break;
|
||||||
|
case 5: *width = 250; break;
|
||||||
|
case 4: *width = 200; break;
|
||||||
|
case 3: *width = 150; break;
|
||||||
|
case 2: *width = 100; break;
|
||||||
|
case 1: *width = 50; break;
|
||||||
|
default: return -RIG_EINVAL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RIG_MODE_LSB:
|
||||||
|
case RIG_MODE_USB:
|
||||||
|
switch (w) {
|
||||||
|
case 0:
|
||||||
|
case 14: *width = 2400; break; /* normal */
|
||||||
|
case 9: *width = 1800; break; /* narrow */
|
||||||
|
case 25: *width = 4000; break; /* wide */
|
||||||
|
case 24: *width = 3800; break; /* wide */
|
||||||
|
case 23: *width = 3600; break; /* wide */
|
||||||
|
case 22: *width = 3400; break; /* wide */
|
||||||
|
case 21: *width = 3200; break; /* wide */
|
||||||
|
case 20: *width = 3000; break; /* wide */
|
||||||
|
case 19: *width = 2900; break;
|
||||||
|
case 18: *width = 2800; break;
|
||||||
|
case 17: *width = 2700; break;
|
||||||
|
case 16: *width = 2600; break;
|
||||||
|
case 15: *width = 2500; break;
|
||||||
|
case 13: *width = 2300; break;
|
||||||
|
case 12: *width = 2200; break;
|
||||||
|
case 11: *width = 2100; break;
|
||||||
|
case 10: *width = 1950; break;
|
||||||
|
case 8: *width = 1650; break;
|
||||||
|
case 7: *width = 1500; break;
|
||||||
|
case 6: *width = 1350; break;
|
||||||
|
case 5: *width = 1100; break;
|
||||||
|
case 4: *width = 850; break;
|
||||||
|
case 3: *width = 600; break;
|
||||||
|
case 2: *width = 400; break;
|
||||||
|
case 1: *width = 200; break;
|
||||||
|
default: return -RIG_EINVAL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RIG_MODE_AM:
|
||||||
|
case RIG_MODE_PKTFM:
|
||||||
|
case RIG_MODE_FM:
|
||||||
|
return RIG_OK;
|
||||||
|
default:
|
||||||
|
return -RIG_EINVAL;
|
||||||
|
} /* end switch(mode) */
|
||||||
|
|
||||||
|
} else { /* end if FT950 */
|
||||||
/* FT450, FT2000, FT5000, FT9000 */
|
/* FT450, FT2000, FT5000, FT9000 */
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case RIG_MODE_PKTUSB:
|
case RIG_MODE_PKTUSB:
|
||||||
|
|
|
@ -103,6 +103,7 @@ DECLARE_INITRIG_BACKEND(yaesu)
|
||||||
rig_register(&frg9600_caps);
|
rig_register(&frg9600_caps);
|
||||||
rig_register(&vr5000_caps);
|
rig_register(&vr5000_caps);
|
||||||
rig_register(&vx1700_caps);
|
rig_register(&vx1700_caps);
|
||||||
|
rig_register(&ft1200_caps);
|
||||||
|
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,5 +74,6 @@ extern const struct rig_caps frg8800_caps;
|
||||||
extern const struct rig_caps frg9600_caps;
|
extern const struct rig_caps frg9600_caps;
|
||||||
extern const struct rig_caps vr5000_caps;
|
extern const struct rig_caps vr5000_caps;
|
||||||
extern const struct rig_caps vx1700_caps;
|
extern const struct rig_caps vx1700_caps;
|
||||||
|
extern const struct rig_caps ft1200_caps;
|
||||||
|
|
||||||
#endif /* _YAESU_H */
|
#endif /* _YAESU_H */
|
||||||
|
|
Ładowanie…
Reference in New Issue