Logo Search packages:      
Sourcecode: hamlib version File versions

static int tt565_get_split_vfo ( RIG rig,
vfo_t  vfo,
split_t split,
vfo_t tx_vfo 

Get the current split status and Tx vfo selection.

rig must != NULL
split Returned with RIG_SPLIT_ON if Tx <> Rx vfo, .._OFF otherwise
tx_vfo Returned RIG_VFO_x, signifying selected Tx vfo
RIG_OK or < 0

Definition at line 489 of file orion.c.

References EOM, rig_debug(), RIG_DEBUG_ERR, RIG_EPROTO, RIG_OK, RIG_SPLIT_OFF, RIG_SPLIT_ON, RIG_VFO_SUB, tt2vfo(), and tt565_transaction().

      int cmd_len, resp_len, retval;
      char cmdbuf[TT565_BUFSIZE], respbuf[TT565_BUFSIZE];
      char ttreceiver;

      cmd_len = sprintf(cmdbuf, "?KV" EOM);
      resp_len = sizeof(respbuf);   
      retval = tt565_transaction (rig, cmdbuf, cmd_len, respbuf, &resp_len);

      if (retval != RIG_OK)
            return retval;

      if (respbuf[2] != 'V' || resp_len < 5) {
            rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
                              __FUNCTION__, respbuf);
            return -RIG_EPROTO;

      ttreceiver = vfo == RIG_VFO_SUB ? respbuf[3] : respbuf[4];

      *tx_vfo = tt2vfo(respbuf[5]);

      *split = ttreceiver == respbuf[5] ? RIG_SPLIT_OFF : RIG_SPLIT_ON;

      return RIG_OK;

Generated by  Doxygen 1.6.0   Back to index