diff --git a/rigs/icom/ic7000.c b/rigs/icom/ic7000.c index 7b9d9640f..e40c6b66f 100644 --- a/rigs/icom/ic7000.c +++ b/rigs/icom/ic7000.c @@ -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, diff --git a/rigs/icom/ic7100.c b/rigs/icom/ic7100.c index 7c3a50246..4e3d853c7 100644 --- a/rigs/icom/ic7100.c +++ b/rigs/icom/ic7100.c @@ -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, diff --git a/rigs/icom/ic7200.c b/rigs/icom/ic7200.c index 37e4a1f30..f9f7e94af 100644 --- a/rigs/icom/ic7200.c +++ b/rigs/icom/ic7200.c @@ -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, diff --git a/rigs/icom/ic7300.c b/rigs/icom/ic7300.c index b89f720c0..19b276d0b 100644 --- a/rigs/icom/ic7300.c +++ b/rigs/icom/ic7300.c @@ -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, diff --git a/rigs/icom/ic7410.c b/rigs/icom/ic7410.c index b50ffaa43..c0b3c1fdb 100644 --- a/rigs/icom/ic7410.c +++ b/rigs/icom/ic7410.c @@ -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, diff --git a/rigs/icom/ic746.c b/rigs/icom/ic746.c index 8bee213ef..ed2c0f56d 100644 --- a/rigs/icom/ic746.c +++ b/rigs/icom/ic746.c @@ -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, diff --git a/rigs/icom/ic756.c b/rigs/icom/ic756.c index 27b3acc8c..e890e8135 100644 --- a/rigs/icom/ic756.c +++ b/rigs/icom/ic756.c @@ -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, diff --git a/rigs/icom/ic7600.c b/rigs/icom/ic7600.c index 9c54ea7f3..aa324d5cd 100644 --- a/rigs/icom/ic7600.c +++ b/rigs/icom/ic7600.c @@ -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, diff --git a/rigs/icom/ic7610.c b/rigs/icom/ic7610.c index ce7999170..9e5110849 100644 --- a/rigs/icom/ic7610.c +++ b/rigs/icom/ic7610.c @@ -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, diff --git a/rigs/icom/ic7700.c b/rigs/icom/ic7700.c index f2fd1d199..1343b30dd 100644 --- a/rigs/icom/ic7700.c +++ b/rigs/icom/ic7700.c @@ -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, diff --git a/rigs/icom/ic7800.c b/rigs/icom/ic7800.c index ffdc4e02d..f080a84b2 100644 --- a/rigs/icom/ic7800.c +++ b/rigs/icom/ic7800.c @@ -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, diff --git a/rigs/icom/ic785x.c b/rigs/icom/ic785x.c index bf49eb652..721deb6db 100644 --- a/rigs/icom/ic785x.c +++ b/rigs/icom/ic785x.c @@ -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, diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index c4bd941aa..e1700df11 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -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) { diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 8571d014f..646c9e053 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include #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) diff --git a/rigs/icom/icr8600.c b/rigs/icom/icr8600.c index 874c010ef..0790c9051 100644 --- a/rigs/icom/icr8600.c +++ b/rigs/icom/icr8600.c @@ -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, diff --git a/tests/dumpcaps.c b/tests/dumpcaps.c index 8a6c6b031..e446e732c 100644 --- a/tests/dumpcaps.c +++ b/tests/dumpcaps.c @@ -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)