Improve firmware check in k3.c

pull/155/head
Michael Black 2019-12-07 22:58:15 -06:00
rodzic d3c9c8113c
commit 16eac108f5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
1 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -1585,15 +1585,18 @@ int k3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
switch (level)
{
float firmwareVersion;
float firmware_have;
float firmware_need;
case RIG_LEVEL_STRENGTH:
/* As of FW rev 4.37 the K3 supports an 'SMH' command that
* offers a higher resolution, 0-100 (mine went to 106),
* rawstr value for more precise S-meter reporting.
*/
firmwareVersion = atof(priv->fw_rev);
firmware_have = 0;
if (priv->fw_rev != NULL) sscanf(priv->fw_rev,"%f",&firmware_have);
sscanf("4.37","%f",&firmware_need);
if (firmwareVersion < 4.37)
if (firmware_have < firmware_need)
{
cal_table_t str_cal = K3_SM_CAL;