Logo Search packages:      
Sourcecode: hamlib version File versions  Download package

static int tt565_set_vfo ( RIG rig,
vfo_t  vfo 
)

set RIG_VFO_CURR and send info to physical rig.

Parameters:
rigmust != NULL
vfoRIG_VFO_MAIN or RIG_VFO_SUB
Returns:
RIG_OK or < 0 Places Orion into Main or Sub Rx active state

Definition at line 402 of file orion.c.

References EOM, rig_state::priv, RIG_OK, RIG_VFO_CURR, RIG_VFO_MAIN, RIG_VFO_SUB, rig::state, tt565_transaction(), and tt565_priv_data::vfo_curr.

{
      struct tt565_priv_data *priv = (struct tt565_priv_data *)rig->state.priv;
      int vfo_len;
      char vfobuf[TT565_BUFSIZE];

      if (vfo == RIG_VFO_CURR)
            return RIG_OK;

      if (vfo == RIG_VFO_MAIN || vfo == RIG_VFO_SUB) {
            /* Select Sub or Main RX */
            vfo_len = sprintf (vfobuf, "*K%c" EOM, 
                        vfo == RIG_VFO_SUB ? 'S' : 'M');

            return tt565_transaction (rig, vfobuf, vfo_len, NULL, NULL);
      }

      priv->vfo_curr = vfo;

      return RIG_OK;
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index