Fix all Icom rigs AGC values for correct printout with dumpcaps

https://github.com/Hamlib/Hamlib/issues/1096
pull/1102/head
Mike Black W9MDB 2022-07-29 23:43:34 -05:00
rodzic 2703aa7dab
commit 2b7c2ab5ce
16 zmienionych plików z 57 dodań i 41 usunięć

Wyświetl plik

@ -184,7 +184,7 @@ static const struct icom_priv_caps IC7000_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
.extcmds = ic7000_extcmds,
.r2i_mode = ic7000_r2i_mode
@ -195,7 +195,7 @@ const struct rig_caps ic7000_caps =
RIG_MODEL(RIG_MODEL_IC7000),
.model_name = "IC-7000",
.mfg_name = "Icom",
.version = BACKEND_VER ".2",
.version = BACKEND_VER ".3",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,

Wyświetl plik

@ -194,7 +194,7 @@ static const struct icom_priv_caps ic7100_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
.extcmds = ic7100_extcmds,
.antack_len = 2,
@ -306,7 +306,7 @@ const struct rig_caps ic7100_caps =
RIG_MODEL(RIG_MODEL_IC7100),
.model_name = "IC-7100",
.mfg_name = "Icom",
.version = BACKEND_VER ".2",
.version = BACKEND_VER ".3",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,

Wyświetl plik

@ -118,7 +118,7 @@ static const struct icom_priv_caps IC7200_priv_caps =
{ .level = RIG_AGC_OFF, .icom_level = 0 },
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_SLOW, .icom_level = 2 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
};
@ -127,7 +127,7 @@ const struct rig_caps ic7200_caps =
RIG_MODEL(RIG_MODEL_IC7200),
.model_name = "IC-7200",
.mfg_name = "Icom",
.version = BACKEND_VER ".1",
.version = BACKEND_VER ".2",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,

Wyświetl plik

@ -284,7 +284,7 @@ static const struct icom_priv_caps IC7300_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
.spectrum_scope_caps = {
.spectrum_line_length = 475,
@ -381,7 +381,7 @@ static const struct icom_priv_caps IC9700_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
.spectrum_scope_caps = {
.spectrum_line_length = 475,
@ -428,7 +428,7 @@ static const struct icom_priv_caps IC705_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
.spectrum_scope_caps = {
.spectrum_line_length = 475,
@ -543,7 +543,7 @@ const struct rig_caps ic7300_caps =
RIG_MODEL(RIG_MODEL_IC7300),
.model_name = "IC-7300",
.mfg_name = "Icom",
.version = BACKEND_VER ".7",
.version = BACKEND_VER ".8",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -778,7 +778,7 @@ struct rig_caps ic9700_caps =
RIG_MODEL(RIG_MODEL_IC9700),
.model_name = "IC-9700",
.mfg_name = "Icom",
.version = BACKEND_VER ".8",
.version = BACKEND_VER ".9",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -1089,7 +1089,7 @@ const struct rig_caps ic705_caps =
RIG_MODEL(RIG_MODEL_IC705),
.model_name = "IC-705",
.mfg_name = "Icom",
.version = BACKEND_VER ".5",
.version = BACKEND_VER ".6",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,

Wyświetl plik

@ -116,7 +116,7 @@ static const struct icom_priv_caps ic7410_priv_caps =
{ .level = RIG_AGC_SLOW, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_FAST, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
};
@ -126,7 +126,7 @@ const struct rig_caps ic7410_caps =
RIG_MODEL(RIG_MODEL_IC7410),
.model_name = "IC-7410",
.mfg_name = "Icom",
.version = BACKEND_VER ".1",
.version = BACKEND_VER ".2",
.copyright = "LGPL",
.status = RIG_STATUS_ALPHA,
.rig_type = RIG_TYPE_TRANSCEIVER,

Wyświetl plik

@ -175,7 +175,7 @@ static const struct icom_priv_caps ic746_priv_caps =
{ .level = RIG_AGC_SLOW, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_FAST, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
};
@ -184,7 +184,7 @@ const struct rig_caps ic746_caps =
RIG_MODEL(RIG_MODEL_IC746),
.model_name = "IC-746",
.mfg_name = "Icom",
.version = BACKEND_VER ".2",
.version = BACKEND_VER ".3",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,

Wyświetl plik

@ -131,7 +131,7 @@ static const struct icom_priv_caps ic756_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
};
@ -140,7 +140,7 @@ const struct rig_caps ic756_caps =
RIG_MODEL(RIG_MODEL_IC756),
.model_name = "IC-756",
.mfg_name = "Icom",
.version = BACKEND_VER ".2",
.version = BACKEND_VER ".3",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -295,7 +295,7 @@ static const struct icom_priv_caps ic756pro_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -2 },
},
};
@ -304,7 +304,7 @@ const struct rig_caps ic756pro_caps =
RIG_MODEL(RIG_MODEL_IC756PRO),
.model_name = "IC-756PRO",
.mfg_name = "Icom",
.version = BACKEND_VER ".2",
.version = BACKEND_VER ".3",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -467,7 +467,7 @@ static const struct icom_priv_caps ic756pro2_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
.extcmds = ic756pro_cmdparms, /* Custom op parameters */
};
@ -543,7 +543,7 @@ const struct rig_caps ic756pro2_caps =
RIG_MODEL(RIG_MODEL_IC756PROII),
.model_name = "IC-756PROII",
.mfg_name = "Icom",
.version = BACKEND_VER ".2",
.version = BACKEND_VER ".3",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -898,7 +898,7 @@ static const struct icom_priv_caps ic756pro3_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
.extcmds = ic756pro_cmdparms, /* Custom op parameters */
};
@ -977,7 +977,7 @@ const struct rig_caps ic756pro3_caps =
RIG_MODEL(RIG_MODEL_IC756PROIII),
.model_name = "IC-756PROIII",
.mfg_name = "Icom",
.version = BACKEND_VER ".2",
.version = BACKEND_VER ".3",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,

Wyświetl plik

@ -158,7 +158,7 @@ static const struct icom_priv_caps ic7600_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
.extcmds = ic7600_extcmds, /* Custom op parameters */
};
@ -269,7 +269,7 @@ const struct rig_caps ic7600_caps =
RIG_MODEL(RIG_MODEL_IC7600),
.model_name = "IC-7600",
.mfg_name = "Icom",
.version = BACKEND_VER ".3",
.version = BACKEND_VER ".4",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,

Wyświetl plik

@ -163,7 +163,7 @@ static const struct icom_priv_caps ic7610_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
.spectrum_scope_caps = {
.spectrum_line_length = 689,
@ -349,7 +349,7 @@ const struct rig_caps ic7610_caps =
RIG_MODEL(RIG_MODEL_IC7610),
.model_name = "IC-7610",
.mfg_name = "Icom",
.version = BACKEND_VER ".6",
.version = BACKEND_VER ".7",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,

Wyświetl plik

@ -141,7 +141,7 @@ static const struct icom_priv_caps ic7700_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
.extcmds = ic7700_extcmds,
};
@ -251,7 +251,7 @@ const struct rig_caps ic7700_caps =
RIG_MODEL(RIG_MODEL_IC7700),
.model_name = "IC-7700",
.mfg_name = "Icom",
.version = BACKEND_VER ".1",
.version = BACKEND_VER ".2",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,

Wyświetl plik

@ -143,7 +143,7 @@ static const struct icom_priv_caps ic7800_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
.extcmds = ic7800_extcmds,
};
@ -153,7 +153,7 @@ const struct rig_caps ic7800_caps =
RIG_MODEL(RIG_MODEL_IC7800),
.model_name = "IC-7800",
.mfg_name = "Icom",
.version = BACKEND_VER ".5",
.version = BACKEND_VER ".6",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,

Wyświetl plik

@ -156,7 +156,7 @@ static struct icom_priv_caps ic785x_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
.spectrum_scope_caps = {
.spectrum_line_length = 689,
@ -241,7 +241,7 @@ const struct rig_caps ic785x_caps =
RIG_MODEL(RIG_MODEL_IC785x),
.model_name = "IC-7850/7851",
.mfg_name = "Icom",
.version = BACKEND_VER ".3",
.version = BACKEND_VER ".4",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,

Wyświetl plik

@ -3437,7 +3437,7 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
int found = 0;
for (i = 0;
i <= RIG_AGC_LAST && priv_caps->agc_levels[i].level >= 0; i++)
i <= RIG_AGC_LAST && priv_caps->agc_levels[i].level != RIG_AGC_LAST && priv_caps->agc_levels[i].icom_level >= 0; i++)
{
if (priv_caps->agc_levels[i].level == val.i)
{

Wyświetl plik

@ -30,7 +30,7 @@
#include <sys/time.h>
#endif
#define BACKEND_VER "20220630"
#define BACKEND_VER "20220729"
#define ICOM_IS_SECONDARY_VFO(vfo) ((vfo) & (RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B))
#define ICOM_GET_VFO_NUMBER(vfo) (ICOM_IS_SECONDARY_VFO(vfo) ? 0x01 : 0x00)

Wyświetl plik

@ -106,7 +106,7 @@ static struct icom_priv_caps icr8600_priv_caps =
{ .level = RIG_AGC_FAST, .icom_level = 1 },
{ .level = RIG_AGC_MEDIUM, .icom_level = 2 },
{ .level = RIG_AGC_SLOW, .icom_level = 3 },
{ .level = -1, .icom_level = 0 },
{ .level = RIG_AGC_LAST, .icom_level = -1 },
},
.spectrum_scope_caps = {
.spectrum_line_length = 475,
@ -131,7 +131,7 @@ const struct rig_caps icr8600_caps =
RIG_MODEL(RIG_MODEL_ICR8600),
.model_name = "IC-R8600",
.mfg_name = "Icom",
.version = BACKEND_VER ".0",
.version = BACKEND_VER ".1",
.copyright = "LGPL",
.status = RIG_STATUS_BETA,
.rig_type = RIG_TYPE_RECEIVER,

Wyświetl plik

@ -29,6 +29,7 @@
#include "sprintflst.h"
#include "rigctl_parse.h"
#include "../rigs/icom/icom.h"
void range_print(FILE *fout, const struct freq_range_list range_list[], int rx);
int range_sanity_check(const struct freq_range_list range_list[], int rx);
@ -292,10 +293,25 @@ int dumpcaps(RIG *rig, FILE *fout)
fprintf(fout, "AGC levels:");
for (i = 0; i < HAMLIB_MAX_AGC_LEVELS && i < caps->agc_level_count; i++)
const struct icom_priv_caps *priv_caps =
(const struct icom_priv_caps *) rig->caps->priv;
if (priv_caps->agc_levels_present)
{
fprintf(fout, " %d=%s", caps->agc_levels[i],
rig_stragclevel(caps->agc_levels[i]));
for (i = 0; i <= RIG_AGC_LAST && priv_caps->agc_levels[i].level != RIG_AGC_LAST
&& priv_caps->agc_levels[i].icom_level >= 0; i++)
{
fprintf(fout, " %d=%s", priv_caps->agc_levels[i].level,
rig_stragclevel(priv_caps->agc_levels[i].level));
}
}
else
{
for (i = 0; i < HAMLIB_MAX_AGC_LEVELS && i < caps->agc_level_count; i++)
{
fprintf(fout, " %d=%s", caps->agc_levels[i],
rig_stragclevel(caps->agc_levels[i]));
}
}
if (i == 0)