Logo Search packages:      
Sourcecode: hamlib version File versions

pbwidth_t HAMLIB_API rig_passband_wide ( RIG rig,
rmode_t  mode 

get the wide passband of a mode

rig The rig handle
mode The mode to get the passband
Returns the wide (default) passband for the given mode. EXAMPLE: rig_set_mode(my_rig, RIG_MODE_AM, rig_passband_wide(my_rig, RIG_MODE_AM) );

the passband in Hz if the operation has been sucessful, or a 0 if an error occured (passband not found, whatever).
See also:
rig_passband_narrow(), rig_passband_normal()

Definition at line 1048 of file rig.c.

References rig_state::filters, filter_list::modes, state, and filter_list::width.

      const struct rig_state *rs;
      pbwidth_t normal;
      int i;

      if (!rig)
            return 0;   /* huhu! */

      rs = &rig->state;

      for (i=0; i<FLTLSTSIZ-1 && rs->filters[i].modes; i++) {
            if (rs->filters[i].modes & mode) {
                  normal = rs->filters[i].width;
                  for (i++; i<FLTLSTSIZ && rs->filters[i].modes; i++) {
                        if ((rs->filters[i].modes & mode) &&
                                          (rs->filters[i].width > normal)) {
                              return rs->filters[i].width;
                  return 0;

      return 0;

Generated by  Doxygen 1.6.0   Back to index