MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / rig_passband_normal

Function rig_passband_normal

src/rig.c:3207–3241  ·  view source on GitHub ↗

* \brief get the normal passband of a mode * \param rig The rig handle * \param mode The mode to get the passband * * Returns the normal (default) passband for the given \a mode. * * \return the passband in Hz if the operation has been successful, * or a 0 if an error occurred (passband not found, whatever). * * \sa rig_passband_narrow(), rig_passband_wide() */

Source from the content-addressed store, hash-verified

3205 * \sa rig_passband_narrow(), rig_passband_wide()
3206 */
3207pbwidth_t HAMLIB_API rig_passband_normal(RIG *rig, rmode_t mode)
3208{
3209 const struct rig_state *rs;
3210 int i;
3211
3212 if (!rig)
3213 {
3214 rig_debug(RIG_DEBUG_ERR, "%s: rig or rig->caps is null\n", __func__);
3215 return (RIG_PASSBAND_NORMAL); /* huhu! */
3216 }
3217
3218 ENTERFUNC;
3219
3220 rs = STATE(rig);
3221
3222 // return CW for CWR and RTTY for RTTYR
3223 if (mode == RIG_MODE_CWR) { mode = RIG_MODE_CW; }
3224
3225 if (mode == RIG_MODE_RTTYR) { mode = RIG_MODE_RTTY; }
3226
3227 for (i = 0; i < HAMLIB_FLTLSTSIZ && rs->filters[i].modes; i++)
3228 {
3229 if (rs->filters[i].modes & mode)
3230 {
3231 rig_debug(RIG_DEBUG_VERBOSE, "%s: Return filter#%d, width=%d\n", __func__, i,
3232 (int)rs->filters[i].width);
3233 RETURNFUNC(rs->filters[i].width);
3234 }
3235 }
3236
3237 rig_debug(RIG_DEBUG_VERBOSE,
3238 "%s: filter not found...returning %d\n", __func__,
3239 0);
3240 RETURNFUNC(0);
3241}
3242
3243
3244/**

Callers 15

wj_set_modeFunction · 0.85
init_chanFunction · 0.85
dummy_set_modeFunction · 0.85
dttsp_set_modeFunction · 0.85
ek89x_set_modeFunction · 0.85
rs_set_modeFunction · 0.85
gp2000_set_modeFunction · 0.85
ar3030_set_modeFunction · 0.85
ar3030_get_modeFunction · 0.85
ar3030_get_channelFunction · 0.85
parse2700_aor_modeFunction · 0.85
format5k_modeFunction · 0.85

Calls 1

rig_debugFunction · 0.85

Tested by 1

mainFunction · 0.68