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

Function rig_get_resolution

src/rig.c:6864–6888  ·  view source on GitHub ↗

* \brief get the best frequency resolution of the rig * \param rig The rig handle * \param mode The mode where the conversion should take place * * Returns the best frequency resolution of the rig, for a given \a mode. * * \return the frequency resolution in Hertz if the operation * has been successful, otherwise a negative value if an error occurred. * */

Source from the content-addressed store, hash-verified

6862 *
6863 */
6864shortfreq_t HAMLIB_API rig_get_resolution(RIG *rig, rmode_t mode)
6865{
6866 const struct rig_state *rs;
6867 int i;
6868
6869 if (!rig || !rig->caps || !mode)
6870 {
6871 rig_debug(RIG_DEBUG_ERR, "%s: rig or rig->caps or mode is null\n", __func__);
6872 return -RIG_EINVAL;
6873 }
6874
6875 ENTERFUNC;
6876
6877 rs = STATE(rig);
6878
6879 for (i = 0; i < HAMLIB_TSLSTSIZ && rs->tuning_steps[i].ts; i++)
6880 {
6881 if (rs->tuning_steps[i].modes & mode)
6882 {
6883 RETURNFUNC(rs->tuning_steps[i].ts);
6884 }
6885 }
6886
6887 RETURNFUNC(-RIG_EINVAL);
6888}
6889
6890
6891/**

Callers 1

getResolutionMethod · 0.85

Calls 1

rig_debugFunction · 0.85

Tested by

no test coverage detected