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

Function rig_get_range

src/rig.c:7875–7902  ·  view source on GitHub ↗

* \brief find the freq_range of freq/mode * \param range_list The range list to search from * \param freq The frequency that will be part of this range * \param mode The mode that will be part of this range * * Returns a pointer to the #freq_range_t including \a freq and \a mode. * Works for rx and tx range list as well. * * \return the location of the #freq_range_t if found, * oth

Source from the content-addressed store, hash-verified

7873 *
7874 */
7875const freq_range_t *HAMLIB_API rig_get_range(const freq_range_t *range_list,
7876 freq_t freq,
7877 rmode_t mode)
7878{
7879 int i;
7880
7881 if (range_list == NULL)
7882 {
7883 return (NULL);
7884 }
7885
7886 for (i = 0; i < HAMLIB_FRQRANGESIZ; i++)
7887 {
7888 if (range_list[i].startf == 0 && range_list[i].endf == 0)
7889 {
7890 return (NULL);
7891 }
7892
7893 if (freq >= range_list[i].startf && freq <= range_list[i].endf &&
7894 (range_list[i].modes & mode))
7895 {
7896 const freq_range_t *f = &range_list[i];
7897 return (f);
7898 }
7899 }
7900
7901 return (NULL);
7902}
7903
7904/**
7905 * \brief set the vfo option for rigctld

Callers 8

v4l_set_freqFunction · 0.85
v4l_get_freqFunction · 0.85
v4l2_set_freqFunction · 0.85
v4l2_get_freqFunction · 0.85
icom_power2mWFunction · 0.85
rig_power2mWFunction · 0.85
rig_mW2powerFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected