mirror of
https://github.com/Hamlib/Hamlib
synced 2026-08-13 17:32:05 -04:00
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:
parent
6127d79f7b
commit
280664b02e
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue