[Hamlib-developer] RFC #1019--enum meter_level_e needs to be removed
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Nate B. <n0...@n0...> - 2025-07-31 01:01:38
|
https://github.com/Hamlib/Hamlib/issues/1019 It's only used in two rigs and has been replaced by individual meter calls find . -name "*.c" -exec grep RIG_METER {} \; -print case RIG_METER_SWR: case RIG_METER_COMP: case RIG_METER_ALC: val->i = RIG_METER_SWR; val->i = RIG_METER_COMP; val->i = RIG_METER_ALC; val->i = RIG_METER_NONE; ./rigs/kenwood/ts480.c case '1': val->i = RIG_METER_ALC; break; case '2': val->i = RIG_METER_SWR; break; case '3': val->i = RIG_METER_COMP; break; case '4': val->i = RIG_METER_IC; break; case '5': val->i = RIG_METER_VDD; break; default: val->i = RIG_METER_NONE; break; ./rigs/kenwood/ts990s.c case RIG_METER_ALC: SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), format, 1); case RIG_METER_PO: case RIG_METER_SWR: SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), format, 3); case RIG_METER_COMP: SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), format, 0); case RIG_METER_IC: SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), format, 4); case RIG_METER_VDD: SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), format, 5); if (tuner && meter.i != RIG_METER_SWR) && meter.i == RIG_METER_SWR) ? '2' : '6', case '0': val->i = RIG_METER_COMP; break; case '1': val->i = RIG_METER_ALC; break; case '2': val->i = RIG_METER_PO; break; case '3': val->i = RIG_METER_SWR; break; case '4': val->i = RIG_METER_IC; break; /* ID CURRENT */ case '5': val->i = RIG_METER_VDD; break; /* Final Amp Voltage */ ./rigs/yaesu/newcat.c ----------------- Turns out Mike truncated the output from newcat.c so it's likely that more radio backends depend on this enumeration. Also not shown is that the ts2000.c file contains these values as well. If the enum values can be replaced by better functions, then that should be the path to take. 73, Nate -- "The optimist proclaims that we live in the best of all possible worlds. The pessimist fears this is true." Web: https://www.n0nb.us Projects: https://github.com/N0NB GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819 |