kopia lustrzana https://github.com/Hamlib/Hamlib
New IC-M710 and IC-M802 backends
rodzic
80f921954b
commit
c61fe45b29
2
NEWS
2
NEWS
|
@ -51,7 +51,7 @@ Version 3.0
|
|||
only invoke pkg-config when either or both of these features are
|
||||
selected. Only the Winradio g313 model uses libdl so test for it
|
||||
only when Winradio backend is enabled.
|
||||
* New IC-M700PRO.
|
||||
* New IC-M700PRO, IC-M710, IC-M802.
|
||||
|
||||
Version 1.2.15.3
|
||||
2012-11-01
|
||||
|
|
|
@ -65,6 +65,8 @@
|
|||
%ignore RIG_BACKEND_RS;
|
||||
%ignore RIG_ADAT;
|
||||
%ignore RIG_BACKEND_ADAT;
|
||||
%ignore RIG_ICMARINE;
|
||||
%ignore RIG_BACKEND_ICMARINE;
|
||||
|
||||
%ignore ROT_DUMMY;
|
||||
%ignore ROT_BACKEND_DUMMY;
|
||||
|
|
|
@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir)
|
|||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := icm700pro.c icm802.c \
|
||||
LOCAL_SRC_FILES := icm700pro.c icm710.c icm802.c \
|
||||
icmarine.c
|
||||
LOCAL_MODULE := icmarine
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#icm802.c
|
||||
ICMARINESRC = icm700pro.c \
|
||||
ICMARINESRC = icm700pro.c icm710.c icm802.c \
|
||||
icmarine.c icmarine.h
|
||||
|
||||
noinst_LTLIBRARIES = libhamlib-icmarine.la
|
||||
|
|
|
@ -0,0 +1,179 @@
|
|||
/*
|
||||
* Hamlib ICOM Marine backend - description of IC-M710 caps
|
||||
* Copyright (c) 2015 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* 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 <stdlib.h>
|
||||
|
||||
#include "hamlib/rig.h"
|
||||
#include "icmarine.h"
|
||||
#include "idx_builtin.h"
|
||||
#include "bandplan.h"
|
||||
|
||||
#define ICM710_MODES (RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_RTTY)
|
||||
#define ICM710_RX_MODES (ICM710_MODES|RIG_MODE_AM)
|
||||
|
||||
#define ICM710_FUNC_ALL (RIG_FUNC_NB)
|
||||
|
||||
#define ICM710_LEVEL_ALL (RIG_LEVEL_RFPOWER|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_AGC|RIG_LEVEL_RAWSTR)
|
||||
|
||||
#define ICM710_VFO_ALL (RIG_VFO_A)
|
||||
|
||||
#define ICM710_VFO_OPS (RIG_OP_TUNE)
|
||||
|
||||
#define ICM710_SCAN_OPS (RIG_SCAN_NONE)
|
||||
|
||||
/*
|
||||
* TODO calibrate the real values
|
||||
*/
|
||||
#define ICM710_STR_CAL { 2, {{ 0, -60}, { 8, 60}} }
|
||||
|
||||
|
||||
static const struct icmarine_priv_caps icm710_priv_caps = {
|
||||
.default_remote_id = 0x01, /* default address */
|
||||
};
|
||||
|
||||
|
||||
const struct rig_caps icm710_caps = {
|
||||
.rig_model = RIG_MODEL_IC_M710,
|
||||
.model_name = "IC-M710",
|
||||
.mfg_name = "Icom",
|
||||
.version = BACKEND_VER,
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_UNTESTED,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
.ptt_type = RIG_PTT_RIG,
|
||||
.dcd_type = RIG_DCD_RIG,
|
||||
.port_type = RIG_PORT_SERIAL,
|
||||
.serial_rate_min = 4800,
|
||||
.serial_rate_max = 4800,
|
||||
.serial_data_bits = 8,
|
||||
.serial_stop_bits = 1,
|
||||
.serial_parity = RIG_PARITY_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.write_delay = 0,
|
||||
.post_write_delay = 0,
|
||||
.timeout = 500,
|
||||
.retry = 0,
|
||||
.has_get_func = ICM710_FUNC_ALL,
|
||||
.has_set_func = ICM710_FUNC_ALL,
|
||||
.has_get_level = ICM710_LEVEL_ALL,
|
||||
.has_set_level = RIG_LEVEL_SET(ICM710_LEVEL_ALL),
|
||||
.has_get_parm = RIG_PARM_NONE,
|
||||
.has_set_parm = RIG_PARM_NONE,
|
||||
.level_gran = {
|
||||
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 8 } },
|
||||
},
|
||||
.parm_gran = {},
|
||||
.str_cal = ICM710_STR_CAL,
|
||||
.ctcss_list = NULL,
|
||||
.dcs_list = NULL,
|
||||
.preamp = { RIG_DBLST_END, },
|
||||
.attenuator = { RIG_DBLST_END, },
|
||||
.max_rit = Hz(0),
|
||||
.max_xit = Hz(0),
|
||||
.max_ifshift = Hz(0),
|
||||
.targetable_vfo = 0,
|
||||
.vfo_ops = ICM710_VFO_OPS,
|
||||
.scan_ops = ICM710_SCAN_OPS,
|
||||
.transceive = RIG_TRN_OFF,
|
||||
.bank_qty = 0,
|
||||
.chan_desc_sz = 0,
|
||||
|
||||
.chan_list = {
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
.rx_range_list1 = { {kHz(500),MHz(30)-100,ICM710_RX_MODES,-1,-1,ICM710_VFO_ALL},
|
||||
RIG_FRNG_END, },
|
||||
.tx_range_list1 = {
|
||||
{kHz(1600),MHz(3)-100,ICM710_MODES,W(60),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(4), MHz(5)-100,ICM710_MODES,W(60),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(6), MHz(7)-100,ICM710_MODES,W(60),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(8), MHz(9)-100,ICM710_MODES,W(60),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(12), MHz(14)-100,ICM710_MODES,W(60),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(16), MHz(18)-100,ICM710_MODES,W(60),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(18), MHz(20)-100,ICM710_MODES,W(60),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(22), MHz(23)-100,ICM710_MODES,W(60),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(25), MHz(27.500),ICM710_MODES,W(60),W( 60),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.rx_range_list2 = { {kHz(500),MHz(30)-100,ICM710_RX_MODES,-1,-1,ICM710_VFO_ALL},
|
||||
RIG_FRNG_END, },
|
||||
.tx_range_list2 = {
|
||||
{kHz(1600),MHz(3)-100,ICM710_MODES,W(20),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(4), MHz(5)-100,ICM710_MODES,W(20),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(6), MHz(7)-100,ICM710_MODES,W(20),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(8), MHz(9)-100,ICM710_MODES,W(20),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(12), MHz(14)-100,ICM710_MODES,W(20),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(16), MHz(18)-100,ICM710_MODES,W(20),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(18), MHz(20)-100,ICM710_MODES,W(20),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(22), MHz(23)-100,ICM710_MODES,W(20),W(150),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(25), MHz(27.500),ICM710_MODES,W(20),W( 60),ICM710_VFO_ALL,RIG_ANT_1},
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.tuning_steps = {
|
||||
{ICM710_RX_MODES,Hz(1)},
|
||||
RIG_TS_END,
|
||||
},
|
||||
/* mode/filter list, remember: order matters! */
|
||||
.filters = {
|
||||
{RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_RTTY, kHz(2.3)},
|
||||
{RIG_MODE_AM, kHz(14)},
|
||||
RIG_FLT_END,
|
||||
},
|
||||
|
||||
.cfgparams = icmarine_cfg_params,
|
||||
.set_conf = icmarine_set_conf,
|
||||
.get_conf = icmarine_get_conf,
|
||||
|
||||
.priv = (void*)&icm710_priv_caps,
|
||||
.rig_init = icmarine_init,
|
||||
.rig_cleanup = icmarine_cleanup,
|
||||
.rig_open = NULL,
|
||||
.rig_close = NULL,
|
||||
|
||||
.set_freq = icmarine_set_freq,
|
||||
.get_freq = icmarine_get_freq,
|
||||
.set_split_freq = icmarine_set_tx_freq,
|
||||
.get_split_freq = icmarine_get_tx_freq,
|
||||
.set_split_vfo = icmarine_set_split_vfo,
|
||||
.get_split_vfo = icmarine_get_split_vfo,
|
||||
.set_mode = icmarine_set_mode,
|
||||
.get_mode = icmarine_get_mode,
|
||||
|
||||
.set_ptt = icmarine_set_ptt,
|
||||
.get_ptt = icmarine_get_ptt,
|
||||
.get_dcd = icmarine_get_dcd,
|
||||
.vfo_op = icmarine_vfo_op,
|
||||
|
||||
.set_level = icmarine_set_level,
|
||||
.get_level = icmarine_get_level,
|
||||
.set_func = icmarine_set_func,
|
||||
.get_func = icmarine_get_func,
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
/*
|
||||
* Hamlib ICOM Marine backend - description of IC-M802 caps
|
||||
* Copyright (c) 2014-2015 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* 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 <stdlib.h>
|
||||
|
||||
#include "hamlib/rig.h"
|
||||
#include "icmarine.h"
|
||||
#include "idx_builtin.h"
|
||||
#include "bandplan.h"
|
||||
|
||||
#define ICM802_MODES (RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_RTTY)
|
||||
#define ICM802_RX_MODES (ICM802_MODES|RIG_MODE_AM)
|
||||
|
||||
#define ICM802_FUNC_ALL (RIG_FUNC_NB)
|
||||
|
||||
#define ICM802_LEVEL_ALL (RIG_LEVEL_RFPOWER|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_AGC|RIG_LEVEL_RAWSTR)
|
||||
|
||||
#define ICM802_VFO_ALL (RIG_VFO_A)
|
||||
|
||||
#define ICM802_VFO_OPS (RIG_OP_TUNE)
|
||||
|
||||
#define ICM802_SCAN_OPS (RIG_SCAN_NONE)
|
||||
|
||||
/*
|
||||
* TODO calibrate the real values
|
||||
*/
|
||||
#define ICM802_STR_CAL { 2, {{ 0, -60}, { 8, 60}} }
|
||||
|
||||
|
||||
static const struct icmarine_priv_caps icm802_priv_caps = {
|
||||
.default_remote_id = 0x08, /* default address */
|
||||
};
|
||||
|
||||
|
||||
const struct rig_caps icm802_caps = {
|
||||
.rig_model = RIG_MODEL_IC_M802,
|
||||
.model_name = "IC-M802",
|
||||
.mfg_name = "Icom",
|
||||
.version = BACKEND_VER,
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_UNTESTED,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
.ptt_type = RIG_PTT_RIG,
|
||||
.dcd_type = RIG_DCD_RIG,
|
||||
.port_type = RIG_PORT_SERIAL,
|
||||
.serial_rate_min = 4800,
|
||||
.serial_rate_max = 4800,
|
||||
.serial_data_bits = 8,
|
||||
.serial_stop_bits = 1,
|
||||
.serial_parity = RIG_PARITY_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.write_delay = 0,
|
||||
.post_write_delay = 0,
|
||||
.timeout = 500,
|
||||
.retry = 0,
|
||||
.has_get_func = ICM802_FUNC_ALL,
|
||||
.has_set_func = ICM802_FUNC_ALL,
|
||||
.has_get_level = ICM802_LEVEL_ALL,
|
||||
.has_set_level = RIG_LEVEL_SET(ICM802_LEVEL_ALL),
|
||||
.has_get_parm = RIG_PARM_NONE,
|
||||
.has_set_parm = RIG_PARM_NONE,
|
||||
.level_gran = {
|
||||
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 8 } },
|
||||
},
|
||||
.parm_gran = {},
|
||||
.str_cal = ICM802_STR_CAL,
|
||||
.ctcss_list = NULL,
|
||||
.dcs_list = NULL,
|
||||
.preamp = { RIG_DBLST_END, },
|
||||
.attenuator = { RIG_DBLST_END, },
|
||||
.max_rit = Hz(0),
|
||||
.max_xit = Hz(0),
|
||||
.max_ifshift = Hz(0),
|
||||
.targetable_vfo = 0,
|
||||
.vfo_ops = ICM802_VFO_OPS,
|
||||
.scan_ops = ICM802_SCAN_OPS,
|
||||
.transceive = RIG_TRN_OFF,
|
||||
.bank_qty = 0,
|
||||
.chan_desc_sz = 0,
|
||||
|
||||
.chan_list = {
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
.rx_range_list1 = { {kHz(500),MHz(30)-100,ICM802_RX_MODES,-1,-1,ICM802_VFO_ALL},
|
||||
RIG_FRNG_END, },
|
||||
.tx_range_list1 = {
|
||||
{kHz(1600),MHz(3)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(4), MHz(5)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(6), MHz(7)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(8), MHz(9)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(12), MHz(14)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(16), MHz(18)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(18), MHz(20)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(22), MHz(23)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(25), MHz(27.500),ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.rx_range_list2 = { {kHz(500),MHz(30)-100,ICM802_RX_MODES,-1,-1,ICM802_VFO_ALL},
|
||||
RIG_FRNG_END, },
|
||||
.tx_range_list2 = {
|
||||
{kHz(1600),MHz(3)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(4), MHz(5)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(6), MHz(7)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(8), MHz(9)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(12), MHz(14)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(16), MHz(18)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(18), MHz(20)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(22), MHz(23)-100,ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
{MHz(25), MHz(27.500),ICM802_MODES,W(20),W(150),ICM802_VFO_ALL,RIG_ANT_1},
|
||||
RIG_FRNG_END,
|
||||
},
|
||||
|
||||
.tuning_steps = {
|
||||
{ICM802_RX_MODES,Hz(1)},
|
||||
RIG_TS_END,
|
||||
},
|
||||
/* mode/filter list, remember: order matters! */
|
||||
.filters = {
|
||||
{RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_RTTY, kHz(2.3)},
|
||||
{RIG_MODE_AM, kHz(14)},
|
||||
RIG_FLT_END,
|
||||
},
|
||||
|
||||
.cfgparams = icmarine_cfg_params,
|
||||
.set_conf = icmarine_set_conf,
|
||||
.get_conf = icmarine_get_conf,
|
||||
|
||||
.priv = (void*)&icm802_priv_caps,
|
||||
.rig_init = icmarine_init,
|
||||
.rig_cleanup = icmarine_cleanup,
|
||||
.rig_open = NULL,
|
||||
.rig_close = NULL,
|
||||
|
||||
.set_freq = icmarine_set_freq,
|
||||
.get_freq = icmarine_get_freq,
|
||||
.set_split_freq = icmarine_set_tx_freq,
|
||||
.get_split_freq = icmarine_get_tx_freq,
|
||||
.set_split_vfo = icmarine_set_split_vfo,
|
||||
.get_split_vfo = icmarine_get_split_vfo,
|
||||
.set_mode = icmarine_set_mode,
|
||||
.get_mode = icmarine_get_mode,
|
||||
|
||||
.set_ptt = icmarine_set_ptt,
|
||||
.get_ptt = icmarine_get_ptt,
|
||||
.get_dcd = icmarine_get_dcd,
|
||||
.vfo_op = icmarine_vfo_op,
|
||||
|
||||
.set_level = icmarine_set_level,
|
||||
.get_level = icmarine_get_level,
|
||||
.set_func = icmarine_set_func,
|
||||
.get_func = icmarine_get_func,
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -618,7 +618,8 @@ DECLARE_INITRIG_BACKEND(icmarine)
|
|||
rig_debug(RIG_DEBUG_VERBOSE, "icmarine: _init called\n");
|
||||
|
||||
rig_register(&icm700pro_caps);
|
||||
//rig_register(&icm802_caps);
|
||||
rig_register(&icm710_caps);
|
||||
rig_register(&icm802_caps);
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ int icmarine_set_conf(RIG *rig, token_t token, const char *val);
|
|||
int icmarine_get_conf(RIG *rig, token_t token, char *val);
|
||||
|
||||
extern const struct rig_caps icm700pro_caps;
|
||||
extern const struct rig_caps icm710_caps;
|
||||
extern const struct rig_caps icm802_caps;
|
||||
|
||||
#endif /* _ICMARINE_H */
|
||||
|
|
|
@ -521,6 +521,7 @@
|
|||
#define RIG_BACKEND_ICMARINE "icmarine"
|
||||
#define RIG_MODEL_IC_M700PRO RIG_MAKE_MODEL(RIG_ICMARINE, 1)
|
||||
#define RIG_MODEL_IC_M802 RIG_MAKE_MODEL(RIG_ICMARINE, 2)
|
||||
#define RIG_MODEL_IC_M710 RIG_MAKE_MODEL(RIG_ICMARINE, 3)
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
|
|
Ładowanie…
Reference in New Issue