kopia lustrzana https://github.com/Hamlib/Hamlib
Correct CWPitch set/get for Icom radios
Icom has two confusing ways to set/get CW Pitch. The first way is to read/write the knob setting using CI-V command 14 subcommand 9. The second way is just to set/get the actual value via mode command 10. At some point the commands in hamlib changed from the former to the latter, but never adjusted the interpolation code of the former. This commit fixes the set and get routines appropriately.pull/1776/head
rodzic
8abe1ec8e4
commit
6dffee33df
|
@ -3682,8 +3682,9 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
{
|
||||
icom_val = 900;
|
||||
}
|
||||
|
||||
icom_val = (int) lroundf(((float) icom_val - 300) * (255.0f / 600.0f));
|
||||
else
|
||||
icom_val = val.i;
|
||||
//icom_val = (int) lroundf(((float) icom_val - 300) * (255.0f / 600.0f));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -4685,7 +4686,8 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
break;
|
||||
|
||||
case RIG_LEVEL_CWPITCH:
|
||||
val->i = (int) lroundf(300.0f + ((float) icom_val * 600.0f / 255.0f));
|
||||
//val->i = (int) lroundf(300.0f + ((float) icom_val * 600.0f / 255.0f));
|
||||
val->i = icom_val;
|
||||
break;
|
||||
|
||||
case RIG_LEVEL_KEYSPD:
|
||||
|
|
Ładowanie…
Reference in New Issue