kopia lustrzana https://github.com/Hamlib/Hamlib
Normalize Yaesu RFPOWER_METER_LEVELS to 100W
This is a quick fix for most Yaesu rigs We need a new RIG_LEVEL_RFPOWER_METER_WATTS to return watts instead of 0-1.0 https://github.com/Hamlib/Hamlib/issues/462pull/468/head
rodzic
44baf44dcc
commit
ffe7184970
|
@ -163,7 +163,7 @@ const cal_table_float_t yaesu_default_comp_meter_cal =
|
|||
2,
|
||||
{
|
||||
{0, 0.0f},
|
||||
{255, 1.0f},
|
||||
{255, 100.0f},
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -4372,7 +4372,9 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
if (retlvl_len > 3)
|
||||
{
|
||||
// Some rigs like FTDX101 have 6-byte return so we just truncate
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: retlvl of %s getting truncated\n", __func__, retlvl);
|
||||
retlvl[3] = 0;
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: retlvl truncated to %s\n", __func__, retlvl);
|
||||
}
|
||||
|
||||
if (rig->caps->rfpower_meter_cal.size == 0)
|
||||
|
@ -4383,6 +4385,12 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
{
|
||||
val->f = rig_raw2val_float(atoi(retlvl), &rig->caps->rfpower_meter_cal);
|
||||
}
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: RFPOWER_METER=%s, converted to %f\n", __func__, retlvl, val->f);
|
||||
if (val->f > 1.0)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: val->f(%f) clipped at 1.0\n", __func__, val->f);
|
||||
val->f = 1.0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
@ -4395,11 +4403,11 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
|
||||
if (rig->caps->comp_meter_cal.size == 0)
|
||||
{
|
||||
val->f = rig_raw2val_float(atoi(retlvl), &yaesu_default_comp_meter_cal);
|
||||
val->f = rig_raw2val_float(atoi(retlvl), &yaesu_default_comp_meter_cal)/100;
|
||||
}
|
||||
else
|
||||
{
|
||||
val->f = rig_raw2val_float(atoi(retlvl), &rig->caps->comp_meter_cal);
|
||||
val->f = rig_raw2val_float(atoi(retlvl), &rig->caps->comp_meter_cal)/100;
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
typedef char ncboolean;
|
||||
|
||||
/* shared function version */
|
||||
#define NEWCAT_VER "20201211"
|
||||
#define NEWCAT_VER "20201212"
|
||||
|
||||
/* Hopefully large enough for future use, 128 chars plus '\0' */
|
||||
#define NEWCAT_DATA_LEN 129
|
||||
|
|
Ładowanie…
Reference in New Issue