* \brief Convert enum AMP_LEVEL_... to alpha string * \param level AMP_LEVEL_... * \return alpha string * * \sa amp_level_e() */
| 1249 | * \sa amp_level_e() |
| 1250 | */ |
| 1251 | const char *HAMLIB_API amp_strlevel(setting_t level) |
| 1252 | { |
| 1253 | int i; |
| 1254 | |
| 1255 | //rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); |
| 1256 | |
| 1257 | if (level == AMP_LEVEL_NONE) |
| 1258 | { |
| 1259 | return ""; |
| 1260 | } |
| 1261 | |
| 1262 | for (i = 0; amp_level_str[i].str[0] != '\0'; i++) |
| 1263 | { |
| 1264 | if (level == amp_level_str[i].level) |
| 1265 | { |
| 1266 | return amp_level_str[i].str; |
| 1267 | } |
| 1268 | } |
| 1269 | |
| 1270 | return ""; |
| 1271 | } |
| 1272 | |
| 1273 | |
| 1274 | static const struct |