kopia lustrzana https://github.com/Hamlib/Hamlib
rodzic
e2d03ea581
commit
d5f7660781
|
@ -183,7 +183,7 @@ int kpa_transaction(AMP *amp, const char *cmd, char *response, int response_len)
|
||||||
* Get Info
|
* Get Info
|
||||||
* returns the model name string
|
* returns the model name string
|
||||||
*/
|
*/
|
||||||
// cppcheck-suppress constParameterPointer
|
// cppcheck-suppress *
|
||||||
const char *kpa_get_info(AMP *amp)
|
const char *kpa_get_info(AMP *amp)
|
||||||
{
|
{
|
||||||
const struct amp_caps *rc;
|
const struct amp_caps *rc;
|
||||||
|
|
|
@ -2165,9 +2165,8 @@ int adat_cmd_fn_set_freq(RIG *pRig)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// cppcheck-suppress constVariablePointer
|
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
||||||
adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
char acBuf[ ADAT_BUFSZ + 1 ];
|
||||||
char acBuf[ ADAT_BUFSZ + 1 ];
|
|
||||||
|
|
||||||
// Get frequency of selected VFO
|
// Get frequency of selected VFO
|
||||||
|
|
||||||
|
@ -2221,9 +2220,8 @@ int adat_cmd_fn_set_vfo(RIG *pRig)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// cppcheck-suppress constVariablePointer
|
|
||||||
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
||||||
char acBuf[ ADAT_BUFSZ + 1 ];
|
char acBuf[ ADAT_BUFSZ + 1 ];
|
||||||
|
|
||||||
// Switch on VFO
|
// Switch on VFO
|
||||||
|
|
||||||
|
@ -2685,7 +2683,6 @@ const char *adat_get_info(RIG *pRig)
|
||||||
|
|
||||||
if (nRC == RIG_OK)
|
if (nRC == RIG_OK)
|
||||||
{
|
{
|
||||||
// cppcheck-suppress constVariablePointer
|
|
||||||
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
||||||
|
|
||||||
snprintf(acBuf,2048,
|
snprintf(acBuf,2048,
|
||||||
|
@ -2769,7 +2766,6 @@ int adat_get_freq(RIG *pRig, vfo_t vfo, freq_t *freq)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// cppcheck-suppress constVariablePointer
|
|
||||||
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
||||||
|
|
||||||
nRC = adat_transaction(pRig, &adat_cmd_list_get_freq);
|
nRC = adat_transaction(pRig, &adat_cmd_list_get_freq);
|
||||||
|
@ -2927,7 +2923,6 @@ int adat_get_mode(RIG *pRig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// cppcheck-suppress constVariablePointer
|
|
||||||
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
||||||
|
|
||||||
nRC = adat_transaction(pRig, &adat_cmd_list_get_mode);
|
nRC = adat_transaction(pRig, &adat_cmd_list_get_mode);
|
||||||
|
@ -2970,7 +2965,6 @@ int adat_get_vfo(RIG *pRig, vfo_t *vfo)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// cppcheck-suppress constVariablePointer
|
|
||||||
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
||||||
|
|
||||||
nRC = adat_transaction(pRig, &adat_cmd_list_get_vfo);
|
nRC = adat_transaction(pRig, &adat_cmd_list_get_vfo);
|
||||||
|
@ -3050,7 +3044,6 @@ int adat_get_ptt(RIG *pRig, vfo_t vfo, ptt_t *ptt)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// cppcheck-suppress constVariablePointer
|
|
||||||
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
||||||
|
|
||||||
nRC = adat_transaction(pRig, &adat_cmd_list_get_ptt);
|
nRC = adat_transaction(pRig, &adat_cmd_list_get_ptt);
|
||||||
|
@ -3310,7 +3303,6 @@ int adat_get_conf(RIG *pRig, token_t token, char *val)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// cppcheck-suppress constVariablePointer
|
|
||||||
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
||||||
|
|
||||||
switch (token)
|
switch (token)
|
||||||
|
|
|
@ -214,7 +214,7 @@ int anytone_init(RIG *rig)
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
{
|
{
|
||||||
retval = -RIG_ENOMEM;
|
retval = -RIG_ENOMEM;
|
||||||
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -238,7 +238,11 @@ int anytone_cleanup(RIG *rig)
|
||||||
|
|
||||||
ENTERFUNC;
|
ENTERFUNC;
|
||||||
|
|
||||||
if (rig->state.priv != NULL)
|
if (rig == NULL)
|
||||||
|
{
|
||||||
|
RETURNFUNC(-RIG_EARG);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
free(rig->state.priv);
|
free(rig->state.priv);
|
||||||
rig->state.priv = NULL;
|
rig->state.priv = NULL;
|
||||||
|
@ -305,7 +309,7 @@ int anytone_get_vfo(RIG *rig, vfo_t *vfo)
|
||||||
|
|
||||||
ENTERFUNC;
|
ENTERFUNC;
|
||||||
|
|
||||||
anytone_priv_data_ptr p = (anytone_priv_data_ptr) rig->state.priv;
|
const anytone_priv_data_ptr p = (anytone_priv_data_ptr) rig->state.priv;
|
||||||
unsigned char reply[512];
|
unsigned char reply[512];
|
||||||
unsigned char cmd[] = { 0x2b,0x41,0x44,0x41,0x54,0x41,0x3a,0x30,0x30,0x2c,0x30,0x30,0x36,0x0d,0x0a,0x04,0x05,0x00,0x00,0x00,0x00,0x0d,0x0a };
|
unsigned char cmd[] = { 0x2b,0x41,0x44,0x41,0x54,0x41,0x3a,0x30,0x30,0x2c,0x30,0x30,0x36,0x0d,0x0a,0x04,0x05,0x00,0x00,0x00,0x00,0x0d,0x0a };
|
||||||
anytone_transaction(rig, cmd, sizeof(cmd), reply, sizeof(reply), 114);
|
anytone_transaction(rig, cmd, sizeof(cmd), reply, sizeof(reply), 114);
|
||||||
|
@ -327,11 +331,8 @@ int anytone_get_vfo(RIG *rig, vfo_t *vfo)
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
int anytone_set_vfo(RIG *rig, vfo_t vfo)
|
int anytone_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
{
|
{
|
||||||
//anytone_priv_data_t *p = rig->state.priv;
|
|
||||||
|
|
||||||
ENTERFUNC;
|
ENTERFUNC;
|
||||||
RETURNFUNC(RIG_OK);
|
RETURNFUNC(RIG_OK);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
|
@ -410,7 +410,6 @@ static int scanfc(FILE *fin, const char *format, void *p)
|
||||||
rig_debug(RIG_DEBUG_TRACE,"%s fscanf of:", __func__);
|
rig_debug(RIG_DEBUG_TRACE,"%s fscanf of:", __func__);
|
||||||
dump_hex((unsigned char *)p, strlen(p));
|
dump_hex((unsigned char *)p, strlen(p));
|
||||||
rig_debug(RIG_DEBUG_TRACE," failed with format '%s'\n", format);
|
rig_debug(RIG_DEBUG_TRACE," failed with format '%s'\n", format);
|
||||||
ret = 0x0a;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue