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

static int tt565_open ( RIG rig )

tt565_open routine

Parameters:
rigOpen the rig - check firmware version issues

Definition at line 233 of file orion.c.

References RIG_OK, rig::state, rig_state::str_cal, tt565_get_info(), TT565_STR_CAL_V1, and TT565_STR_CAL_V2.

 {
      cal_table_t cal1 = TT565_STR_CAL_V1, cal2 = TT565_STR_CAL_V2;
      char *buf;

      /* Detect version 1 or version 2 firmware. V2 is default. */
      /* The only difference for us is the S-meter cal table */

      /* Get Orion's Version string (?V command response) */      
      buf = (char *)tt565_get_info(rig);

      /* Is Orion firmware version 1.* or 2.*? */
      if (!strstr(buf, "1.")) {
            /* Not v1 means probably v2 */
            memcpy(&rig->state.str_cal, &cal2, sizeof(cal_table_t));
            }
      else {
            memcpy(&rig->state.str_cal, &cal1, sizeof(cal_table_t));
            }
    return RIG_OK;
    }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index