fix: use calibration tables for SWR and ALC meter scaling

Replace naive /100.0f divisor with rig_raw2val_float() using the
FTX1_SWR_CAL and FTX1_ALC_CAL calibration tables added in the
previous commit. This matches how newcat handles meter values for
other Yaesu radios and produces correct SWR ratios and 0.0-1.0
normalized ALC values from raw 0-255 RM readings.
This commit is contained in:
KJ5HST 2026-03-10 01:27:55 -04:00 committed by Nate Bargmann
parent 6127d79f7b
commit 280664b02e
No known key found for this signature in database
GPG key ID: FB2C5130D55A8819

View file

@ -479,11 +479,11 @@ int ftx1_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return ret;
case RIG_LEVEL_SWR:
ret = ftx1_get_meter(rig, 6, &ival); /* RM6=SWR */
if (ret == RIG_OK) val->f = (float)ival / 100.0f;
if (ret == RIG_OK) val->f = rig_raw2val_float(ival, &rig->caps->swr_cal);
return ret;
case RIG_LEVEL_ALC:
ret = ftx1_get_meter(rig, 4, &ival); /* RM4=ALC */
if (ret == RIG_OK) val->f = (float)ival / 100.0f;
if (ret == RIG_OK) val->f = rig_raw2val_float(ival, &rig->caps->alc_cal);
return ret;
case RIG_LEVEL_IF:
{