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

Function amp_parse_level

src/misc.c:1160–1181  ·  view source on GitHub ↗

* \brief Convert alpha string to enum AMP_LEVEL_... * \param s input alpha string * \return AMP_LEVEL_... * * \sa amp_level_e() */

Source from the content-addressed store, hash-verified

1158 * \sa amp_level_e()
1159 */
1160setting_t HAMLIB_API amp_parse_level(const char *s)
1161{
1162 int i;
1163
1164 rig_debug(RIG_DEBUG_VERBOSE, "%s called level=%s\n", __func__, s);
1165
1166 rig_debug(RIG_DEBUG_VERBOSE, "%s called str=%s\n", __func__,
1167 amp_level_str[0].str);
1168
1169 for (i = 0 ; amp_level_str[i].str[0] != '\0'; i++)
1170 {
1171 rig_debug(RIG_DEBUG_VERBOSE, "%s called checking=%s\n", __func__,
1172 amp_level_str[i].str);
1173
1174 if (!strcmp(s, amp_level_str[i].str))
1175 {
1176 return amp_level_str[i].level;
1177 }
1178 }
1179
1180 return AMP_LEVEL_NONE;
1181}
1182
1183
1184/**

Callers 1

ampctl_parse.cFile · 0.85

Calls 1

rig_debugFunction · 0.85

Tested by

no test coverage detected