Logo Search packages:      
Sourcecode: hamlib version File versions

static int tt565_get_xit ( RIG rig,
vfo_t  vfo,
shortfreq_t xit 

Get Tx incremental tuning (Main TRx only).

rig must != NULL
xit Receives Tx incremental tuning, Hz
RIG_OK or < 0

Definition at line 774 of file orion.c.

References EOM, rig_debug(), RIG_DEBUG_ERR, RIG_EPROTO, RIG_OK, and tt565_transaction().

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

      cmd_len = sprintf(cmdbuf, "?R%cX" EOM,

      resp_len = sizeof(respbuf);   
      retval = tt565_transaction (rig, cmdbuf, cmd_len, respbuf, &resp_len);

      if (retval != RIG_OK)
            return retval;

      if (respbuf[1] != 'R' || respbuf[3] != 'X' || resp_len <= 4) {
            rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
                              __FUNCTION__, respbuf);
            return -RIG_EPROTO;

      *xit = atoi(respbuf+4);

      return RIG_OK;

Generated by  Doxygen 1.6.0   Back to index