Added newcat_valid_command() call to newcat_set_xit().

Added newcat_valid_command() call to newcat_get_xit().
FT450 xit is not supported according to CAT Manual.


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2492 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.9
Terry Embry, KJ4EED 2008-12-06 13:29:37 +00:00
rodzic 6fc6310806
commit af8d9476b1
1 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -13,7 +13,7 @@
* FT-950, FT-450. Much testing remains. -N0NB
*
*
* $Id: newcat.c,v 1.14 2008-12-06 02:37:45 mrtembry Exp $
* $Id: newcat.c,v 1.15 2008-12-06 13:29:37 mrtembry Exp $
*
*
* This library is free software; you can redistribute it and/or
@ -1140,6 +1140,9 @@ int newcat_set_xit(RIG * rig, vfo_t vfo, shortfreq_t xit)
priv = (struct newcat_priv_data *)rig->state.priv;
state = &rig->state;
if (!newcat_valid_command(rig, "XT"))
return -RIG_ENAVAIL;
tmp_xit = xit;
xit = abs(xit);
if (xit > rig->caps->max_xit)
@ -1162,7 +1165,7 @@ int newcat_set_xit(RIG * rig, vfo_t vfo, shortfreq_t xit)
int newcat_get_xit(RIG * rig, vfo_t vfo, shortfreq_t * xit)
{
struct newcat_priv_data *priv;
struct newcat_priv_data *priv;
struct rig_state *state;
char *retval;
char xit_on;
@ -1170,6 +1173,9 @@ struct newcat_priv_data *priv;
priv = (struct newcat_priv_data *)rig->state.priv;
state = &rig->state;
if (!newcat_valid_command(rig, "XT"))
return -RIG_ENAVAIL;
*xit = 0;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);