Logo Search packages:      
Sourcecode: hamlib version File versions

static int tt565_get_ts ( RIG rig,
vfo_t  vfo,
shortfreq_t ts 
)

Get Tuning Step for VFO A or B.

Parameters:
rig must != NULL
vfo 
ts Receives Tuning Step, Hz
Returns:
RIG_OK or < 0

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

      *ts = atoi(respbuf+4);

      return RIG_OK;
}


Generated by  Doxygen 1.6.0   Back to index