Fix smartsdr changes

This commit is contained in:
Mike Black W9MDB 2024-05-20 08:11:19 -05:00
parent c4ee53e046
commit 1e806785bc
4 changed files with 82 additions and 11 deletions

View File

@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := flexradio.c sdr1k.c dttsp.c smartsdr.c
LOCAL_SRC_FILES := flexradio.c sdr1k.c dttsp.c smartsdr.c smartsdr_caps.h
LOCAL_MODULE := flexradio
LOCAL_CFLAGS :=

View File

@ -1,5 +1,5 @@
noinst_LTLIBRARIES = libhamlib-flexradio.la
libhamlib_flexradio_la_SOURCES = flexradio.c flexradio.h sdr1k.c dttsp.c smartsdr.c
libhamlib_flexradio_la_SOURCES = flexradio.c flexradio.h sdr1k.c dttsp.c smartsdr.c smartsdr_caps.h
EXTRA_DIST = Android.mk

View File

@ -64,56 +64,56 @@ struct rig_caps smartsdr_a_rig_caps =
{
RIG_MODEL(RIG_MODEL_SMARTSDR_A),
.model_name = "SmartSDR Slice A",
#include "smartsdr_caps.c"
#include "smartsdr_caps.h"
};
struct rig_caps smartsdr_b_rig_caps =
{
RIG_MODEL(RIG_MODEL_SMARTSDR_B),
.model_name = "SmartSDR Slice B",
#include "smartsdr_caps.c"
#include "smartsdr_caps.h"
};
struct rig_caps smartsdr_c_rig_caps =
{
RIG_MODEL(RIG_MODEL_SMARTSDR_C),
.model_name = "SmartSDR Slice C",
#include "smartsdr_caps.c"
#include "smartsdr_caps.h"
};
struct rig_caps smartsdr_d_rig_caps =
{
RIG_MODEL(RIG_MODEL_SMARTSDR_D),
.model_name = "SmartSDR Slice D",
#include "smartsdr_caps.c"
#include "smartsdr_caps.h"
};
struct rig_caps smartsdr_e_rig_caps =
{
RIG_MODEL(RIG_MODEL_SMARTSDR_E),
.model_name = "SmartSDR Slice E",
#include "smartsdr_caps.c"
#include "smartsdr_caps.h"
};
struct rig_caps smartsdr_f_rig_caps =
{
RIG_MODEL(RIG_MODEL_SMARTSDR_F),
.model_name = "SmartSDR Slice F",
#include "smartsdr_caps.c"
#include "smartsdr_caps.h"
};
struct rig_caps smartsdr_g_rig_caps =
{
RIG_MODEL(RIG_MODEL_SMARTSDR_G),
.model_name = "SmartSDR Slice G",
#include "smartsdr_caps.c"
#include "smartsdr_caps.h"
};
struct rig_caps smartsdr_h_rig_caps =
{
RIG_MODEL(RIG_MODEL_SMARTSDR_H),
.model_name = "SmartSDR Slice H",
#include "smartsdr_caps.c"
#include "smartsdr_caps.h"
};
@ -306,7 +306,7 @@ int rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
hamlib_port_t *rp = RIGPORT(rig);
char buf[4096];
char stopset[1] = { 0x0a };
char *rmode;
char *rmode=RIG_MODE_NONE;
ENTERFUNC;
switch (mode)

View File

@ -0,0 +1,71 @@
.mfg_name = "Flex-radio",
.version = "20240519.0",
.copyright = "LGPL",
.status = RIG_STATUS_ALPHA,
.rig_type = RIG_TYPE_TRANSCEIVER,
.targetable_vfo = 0,
.ptt_type = RIG_PTT_RIG,
.port_type = RIG_PORT_NETWORK,
.has_get_func = SMARTSDR_FUNC,
.has_set_func = SMARTSDR_FUNC,
.has_get_level = SMARTSDR_LEVEL,
.has_set_level = RIG_LEVEL_SET(SMARTSDR_LEVEL),
.has_get_parm = SMARTSDR_PARM,
.has_set_parm = RIG_PARM_SET(SMARTSDR_PARM),
.chan_list = {
RIG_CHAN_END,
},
.scan_ops = RIG_SCAN_NONE,
.vfo_ops = RIG_OP_NONE,
.transceive = RIG_TRN_OFF,
.attenuator = { RIG_DBLST_END, },
.preamp = { 14, RIG_DBLST_END, },
.rx_range_list1 = { {
.startf = kHz(30), .endf = MHz(54), .modes = SMARTSDR_MODES,
.low_power = -1, .high_power = -1, SMARTSDR_VFO
},
RIG_FRNG_END,
},
.tx_range_list1 = {
/* restricted to ham band */
FRQ_RNG_HF(1, SMARTSDR_MODES, W(1), W(100), SMARTSDR_VFO, SMARTSDR_ANTS),
FRQ_RNG_6m(1, SMARTSDR_MODES, W(1), W(100), SMARTSDR_VFO, SMARTSDR_ANTS),
RIG_FRNG_END,
},
.rx_range_list2 = { {
.startf = kHz(30), .endf = MHz(100), .modes = SMARTSDR_MODES,
.low_power = -1, .high_power = -1, SMARTSDR_VFO
},
RIG_FRNG_END,
},
.tx_range_list2 = {
/* restricted to ham band */
FRQ_RNG_HF(2, SMARTSDR_MODES, W(1), W(100), SMARTSDR_VFO, SMARTSDR_ANTS),
FRQ_RNG_6m(2, SMARTSDR_MODES, W(1), W(100), SMARTSDR_VFO, SMARTSDR_ANTS),
RIG_FRNG_END,
},
.tuning_steps = { {SMARTSDR_MODES, 1},
RIG_TS_END,
},
.filters = {
{RIG_MODE_ALL, RIG_FLT_ANY},
RIG_FLT_END
},
.priv = NULL, /* priv */
.rig_init = smartsdr_init,
.rig_open = smartsdr_open,
.rig_close = smartsdr_close,
.rig_cleanup = smartsdr_cleanup,
.set_freq = smartsdr_set_freq,
.get_freq = smartsdr_get_freq,
.set_ptt = smartsdr_set_ptt,
// .reset = smartsdr_reset,
// .set_level = smartsdr_set_level,
// .set_func = _set_func,
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS