kopia lustrzana https://github.com/Hamlib/Hamlib
Added RIG_METER_VDD
Did some cleanup git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2523 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.9
rodzic
6e47295527
commit
3fdc46ec32
|
@ -13,7 +13,7 @@
|
|||
* FT-950, FT-450. Much testing remains. -N0NB
|
||||
*
|
||||
*
|
||||
* $Id: newcat.c,v 1.27 2008-12-23 22:36:51 mrtembry Exp $
|
||||
* $Id: newcat.c,v 1.28 2008-12-24 20:17:45 mrtembry Exp $
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
@ -346,16 +346,6 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) {
|
|||
freq < caps->rx_range_list2[0].start || freq > caps->rx_range_list2[0].end)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
//if (vfo == RIG_VFO_CURR) {
|
||||
// vfo = priv->current_vfo; /* from previous vfo cmd */
|
||||
// rig_debug(RIG_DEBUG_TRACE, "%s: priv->current_vfo = 0x%02x\n", __func__, vfo);
|
||||
//} else if (vfo != priv->current_vfo) {
|
||||
// /* force a VFO change if requested vfo value differs from stored value */
|
||||
// err = newcat_set_vfo(rig, vfo);
|
||||
// if (err != RIG_OK)
|
||||
// return err;
|
||||
//}
|
||||
|
||||
err = newcat_set_vfo_from_alias(rig, &vfo);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
@ -379,10 +369,6 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) {
|
|||
// including leading fill zeros
|
||||
|
||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "F%c%08d%c", c, (int)freq, cat_term);
|
||||
#if 0
|
||||
if (!newcat_valid_command(rig, command))
|
||||
return -RIG_ENAVAIL;
|
||||
#endif
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s\n", __func__, priv->cmd_str);
|
||||
|
||||
|
@ -419,16 +405,6 @@ int newcat_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) {
|
|||
priv = (struct newcat_priv_data *)rig->state.priv;
|
||||
state = &rig->state;
|
||||
|
||||
//if (vfo == RIG_VFO_CURR) {
|
||||
// err = newcat_get_vfo(rig, &priv->current_vfo);
|
||||
// if (err != RIG_OK)
|
||||
// return err;
|
||||
|
||||
// vfo = priv->current_vfo; /* from previous get_vfo cmd */
|
||||
// rig_debug(RIG_DEBUG_TRACE,
|
||||
// "%s: priv->current_vfo = 0x%02x\n", __func__, vfo);
|
||||
//}
|
||||
|
||||
err = newcat_set_vfo_from_alias(rig, &vfo);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
@ -668,13 +644,13 @@ int newcat_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
break;
|
||||
case '5':
|
||||
*mode = RIG_MODE_AM;
|
||||
*width = rig_passband_normal(rig, RIG_MODE_AM);
|
||||
err = newcat_get_narrow(rig, vfo, &nar);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
if (nar == TRUE)
|
||||
*width = rig_passband_narrow(rig, RIG_MODE_AM);
|
||||
else
|
||||
*width = rig_passband_normal(rig, RIG_MODE_AM);
|
||||
return RIG_OK;
|
||||
break;
|
||||
case '6':
|
||||
|
@ -691,13 +667,13 @@ int newcat_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
break;
|
||||
case 'A':
|
||||
*mode = RIG_MODE_PKTFM;
|
||||
*width = rig_passband_normal(rig, RIG_MODE_PKTFM);
|
||||
err = newcat_get_narrow(rig, vfo, &nar);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
if (nar == TRUE)
|
||||
*width = rig_passband_narrow(rig, RIG_MODE_PKTFM);
|
||||
else
|
||||
*width = rig_passband_normal(rig, RIG_MODE_PKTFM);
|
||||
return RIG_OK;
|
||||
break;
|
||||
case 'B':
|
||||
|
@ -2051,6 +2027,7 @@ int newcat_get_level(RIG * rig, vfo_t vfo, setting_t level, value_t * val)
|
|||
case '2': val->i = RIG_METER_PO; break;
|
||||
case '3': val->i = RIG_METER_SWR; break;
|
||||
case '4': val->i = RIG_METER_IC; break; /* ID CURRENT */
|
||||
case '5': val->i = RIG_METER_VDD; break; /* Final Amp Voltage */
|
||||
default: return -RIG_EPROTO;
|
||||
}
|
||||
break;
|
||||
|
@ -3336,7 +3313,7 @@ int newcat_get_rxbandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
|
|||
else {
|
||||
|
||||
/* FT450, FT2000, FT9000 */
|
||||
*width = w; /* SH" return debug */
|
||||
// *width = w; /* SH" return debug */
|
||||
}
|
||||
|
||||
return RIG_OK;
|
||||
|
|
Ładowanie…
Reference in New Issue