kopia lustrzana https://github.com/Hamlib/Hamlib
Merge pull request #1389 from dg1sbg/master
RIG ADAT: Adaptation to firmware 1.40fb and transverter board.pull/1392/head
commit
db6ffaf7da
|
@ -73,3 +73,5 @@ libs/
|
||||||
obj/
|
obj/
|
||||||
.project
|
.project
|
||||||
.cproject
|
.cproject
|
||||||
|
.DS_Store
|
||||||
|
._.DS_Store
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// adat.c
|
// adat.c
|
||||||
//
|
//
|
||||||
// Created by Frank Goenninger DG1SBG.
|
// Created by Frank Goenninger DG1SBG.
|
||||||
// Copyright © 2011, 2012 Frank Goenninger.
|
// Copyright © 2011, 2012, 2023 Frank Goenninger.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -1419,10 +1419,9 @@ int adat_priv_clear_result(RIG *pRig)
|
||||||
if (pPriv->pcResult != NULL)
|
if (pPriv->pcResult != NULL)
|
||||||
{
|
{
|
||||||
free(pPriv->pcResult);
|
free(pPriv->pcResult);
|
||||||
}
|
|
||||||
|
|
||||||
pPriv->pcResult = NULL;
|
pPriv->pcResult = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Done !
|
// Done !
|
||||||
|
|
||||||
|
@ -1545,14 +1544,12 @@ int adat_get_single_cmd_result(RIG *pRig)
|
||||||
nRC = -RIG_EINVAL;
|
nRC = -RIG_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
adat_priv_clear_result(pRig);
|
||||||
|
|
||||||
if (nRC == RIG_OK)
|
if (nRC == RIG_OK)
|
||||||
{
|
{
|
||||||
adat_priv_set_result(pRig, pcResult);
|
adat_priv_set_result(pRig, pcResult);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
adat_priv_clear_result(pRig);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2630,28 +2627,9 @@ adat_priv_data_ptr adat_new_priv_data(RIG *pRig)
|
||||||
{
|
{
|
||||||
// Init Priv Data
|
// Init Priv Data
|
||||||
|
|
||||||
pPriv = pRig->state.priv = (adat_priv_data_ptr) calloc(sizeof(adat_priv_data_t),
|
pPriv = pRig->state.priv = (adat_priv_data_ptr) calloc(1,sizeof(adat_priv_data_t));
|
||||||
1);
|
|
||||||
|
|
||||||
if (pRig->state.priv != NULL)
|
if (pRig->state.priv == NULL)
|
||||||
{
|
|
||||||
char acBuf[ ADAT_BUFSZ + 1 ];
|
|
||||||
memset(acBuf, 0, ADAT_BUFSZ + 1);
|
|
||||||
|
|
||||||
// FIXME: pointless code at init time
|
|
||||||
#if 0
|
|
||||||
nRC = adat_get_conf(pRig, TOKEN_ADAT_PRODUCT_NAME, acBuf);
|
|
||||||
|
|
||||||
if (nRC == 0)
|
|
||||||
{
|
|
||||||
pPriv->pcProductName = strdup(acBuf);
|
|
||||||
|
|
||||||
pRig->state.priv = (void *) pPriv;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
nRC = -RIG_ENOMEM;
|
nRC = -RIG_ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// adat.h
|
// adat.h
|
||||||
//
|
//
|
||||||
// Created by Frank Goenninger DG1SBG.
|
// Created by Frank Goenninger DG1SBG.
|
||||||
// Copyright © 2011, 2012 Frank Goenninger.
|
// Copyright © 2011, 2012, 2023 Frank Goenninger.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -42,10 +42,10 @@
|
||||||
// GLOBAL DEFINITIONS
|
// GLOBAL DEFINITIONS
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
#define BACKEND_VER "20191206"
|
#define BACKEND_VER "20230927"
|
||||||
|
|
||||||
#define ADAT_BUFSZ 256
|
#define ADAT_BUFSZ 255
|
||||||
#define ADAT_RESPSZ 256
|
#define ADAT_RESPSZ 255
|
||||||
|
|
||||||
#define ADAT_CR "\x0d"
|
#define ADAT_CR "\x0d"
|
||||||
#define ADAT_EOL "\x0a"
|
#define ADAT_EOL "\x0a"
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
|
|
||||||
// ADAT MODE DEFINITIONS
|
// ADAT MODE DEFINITIONS
|
||||||
|
|
||||||
#define ADAT_MODE_LENGTH 5
|
#define ADAT_MODE_LENGTH 15
|
||||||
#define ADAT_NR_MODES 8
|
#define ADAT_NR_MODES 8
|
||||||
|
|
||||||
// Each mode is defined by three values:
|
// Each mode is defined by three values:
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// adt_200a.c
|
// adt_200a.c
|
||||||
//
|
//
|
||||||
// Created by Frank Goenninger DG1SBG.
|
// Created by Frank Goenninger DG1SBG.
|
||||||
// Copyright © 2011, 2012 Frank Goenninger.
|
// Copyright © 2011, 2012, 2023 Frank Goenninger.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -100,12 +100,18 @@ const struct rig_caps adt_200a_caps =
|
||||||
.rx_range_list1 =
|
.rx_range_list1 =
|
||||||
{
|
{
|
||||||
{ kHz(10), MHz(30), ADT_200A_MODES, -1, -1, ADT_200A_VFO },
|
{ kHz(10), MHz(30), ADT_200A_MODES, -1, -1, ADT_200A_VFO },
|
||||||
|
{ MHz(50), MHz(50.5), ADT_200A_MODES, -1, -1, ADT_200A_VFO },
|
||||||
|
{ MHz(70), MHz(70.7), ADT_200A_MODES, -1, -1, ADT_200A_VFO },
|
||||||
|
{ MHz(146), MHz(148), ADT_200A_MODES, -1, -1, ADT_200A_VFO },
|
||||||
RIG_FRNG_END,
|
RIG_FRNG_END,
|
||||||
},
|
},
|
||||||
|
|
||||||
.tx_range_list1 =
|
.tx_range_list1 =
|
||||||
{
|
{
|
||||||
{ kHz(10), MHz(30), ADT_200A_MODES, mW(100), W(50), ADT_200A_VFO },
|
{ kHz(10), MHz(30), ADT_200A_MODES, mW(100), W(50), ADT_200A_VFO },
|
||||||
|
{ MHz(50), MHz(50.5), ADT_200A_MODES, mW(10), W(1), ADT_200A_FRA },
|
||||||
|
{ MHz(70), MHz(70.7), ADT_200A_MODES, mW(10), W(1), ADT_200A_FRA },
|
||||||
|
{ MHz(146), MHz(148), ADT_200A_MODES, mW(10), mW(100), ADT_200A_FRA },
|
||||||
RIG_FRNG_END,
|
RIG_FRNG_END,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -163,8 +169,10 @@ const struct rig_caps adt_200a_caps =
|
||||||
{ RIG_MODE_FM, Hz(8000) },
|
{ RIG_MODE_FM, Hz(8000) },
|
||||||
{ RIG_MODE_FM, Hz(9000) },
|
{ RIG_MODE_FM, Hz(9000) },
|
||||||
{ RIG_MODE_FM, Hz(10000) },
|
{ RIG_MODE_FM, Hz(10000) },
|
||||||
{ RIG_MODE_FM, Hz(11000) },
|
|
||||||
{ RIG_MODE_FM, Hz(12000) },
|
{ RIG_MODE_FM, Hz(12000) },
|
||||||
|
{ RIG_MODE_FM, Hz(15000) },
|
||||||
|
{ RIG_MODE_FM, Hz(20000) },
|
||||||
|
{ RIG_MODE_FM, Hz(25000) },
|
||||||
RIG_FLT_END,
|
RIG_FLT_END,
|
||||||
},
|
},
|
||||||
.str_cal = ADT_200A_STR_CAL,
|
.str_cal = ADT_200A_STR_CAL,
|
||||||
|
|
Ładowanie…
Reference in New Issue