Logo Search packages:      
Sourcecode: hamlib version File versions

static int tt565_get_rit ( RIG rig,
vfo_t  vfo,
shortfreq_t rit 
)

Get Rx incremental tuning.

Parameters:
rig must != NULL
vfo 
rit Receives Rx incremental tuning, Hz
Returns:
RIG_OK or < 0

Definition at line 719 of file orion.c.

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

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

      cmd_len = sprintf(cmdbuf, "?R%cR" EOM,
                        which_receiver(rig, vfo));

      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] != 'R' || resp_len <= 4) {
            rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
                              __FUNCTION__, respbuf);
            return -RIG_EPROTO;
      }

      *rit = atoi(respbuf+4);

      return RIG_OK;
}


Generated by  Doxygen 1.6.0   Back to index