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

Function rig_setting2idx

src/settings.c:982–998  ·  view source on GitHub ↗

* \brief basically convert setting_t expressed 2^n to n * \param s The setting to convert to * * Converts a setting_t value expressed by 2^n to the value of n. * * \return the index such that 2^n is the setting, otherwise 0 * if the setting was not found. */

Source from the content-addressed store, hash-verified

980 * if the setting was not found.
981 */
982int HAMLIB_API rig_setting2idx(setting_t s)
983{
984 int i;
985
986 rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
987
988 for (i = 0; i < RIG_SETTING_MAX; i++)
989 {
990 if (s & rig_idx2setting(i))
991 {
992 rig_debug(RIG_DEBUG_VERBOSE, "%s: idx=%d\n", __func__, i);
993 return i;
994 }
995 }
996
997 return 0;
998}
999
1000
1001#if 0

Callers 15

dummy_set_levelFunction · 0.85
dummy_get_levelFunction · 0.85
dummy_set_parmFunction · 0.85
dummy_get_parmFunction · 0.85
dummy_set_antFunction · 0.85
dummy_get_antFunction · 0.85
flrig_set_ext_parmFunction · 0.85
flrig_get_ext_parmFunction · 0.85
tci1x_set_ext_parmFunction · 0.85
tci1x_get_ext_parmFunction · 0.85
dummy_set_levelFunction · 0.85
dummy_get_levelFunction · 0.85

Calls 2

rig_debugFunction · 0.85
rig_idx2settingFunction · 0.85

Tested by

no test coverage detected