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

static int tt565_get_ptt ( RIG rig,
vfo_t  vfo,
ptt_t ptt 

Get push to talk (Tx on/off)

rigmust != NULL
pttReceives RIG_PTT_ON or RIG_PTT_OFF
RIG_OK or < 0

Definition at line 820 of file orion.c.

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

      int resp_len, retval;
      char respbuf[TT565_BUFSIZE];

      resp_len = sizeof(respbuf);   
      retval = tt565_transaction (rig, "?S" EOM, 3, respbuf, &resp_len);

      if (retval != RIG_OK)
            return retval;

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

      *ptt = respbuf[2]=='T' ? RIG_PTT_ON : RIG_PTT_OFF ;

      return RIG_OK;

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index