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
markjfine 2025-06-23 17:46:06 -04:00 zatwierdzone przez GitHub
rodzic 8abe1ec8e4
commit 6dffee33df
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -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: