Re-enable -u modes and vfo lists using *_range_list1 entries for the moment

This logic needs to be overhauled as Icom (and probably others) are putting out
rigs with no way to tell what model you have from CAT control.
So we may end up having to explicitly list all rig models which is more user friendly anyways
and will work with WSJT-X and other user-space programs.
So, e.g., IC-9700 would be listed as 5 models: IC-9700-USA, IC_9700-EUR, IC_9700-ITR, IC-9700-TPE, IC-9700-KOR
pull/224/head
Michael Black 2020-02-17 08:46:01 -06:00
rodzic d634f84ed0
commit c40ff7fce6
1 zmienionych plików z 12 dodań i 7 usunięć

Wyświetl plik

@ -407,7 +407,12 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model)
rs->poll_interval = 500;
rs->lo_freq = 0;
#if 0 // this is no longer applicatle -- replace it with something?
#if 0 // this is no longer applicable -- replace it with something?
// we need to be able to figure out what model radio we have
// before we can set up the rig_state with the rig's specific freq range
// if we can't figure out what model rig we have this is impossible
// so we will likely have to make this a parameter the user provides
// or eliminate this logic entirely and make specific RIG_MODEL entries
switch (rs->itu_region)
{
case RIG_ITU_REGION1:
@ -430,16 +435,16 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model)
rs->vfo_list = 0;
rs->mode_list = 0;
for (i = 0; i < FRQRANGESIZ && !RIG_IS_FRNG_END(rs->rx_range_list[i]); i++)
for (i = 0; i < FRQRANGESIZ && !RIG_IS_FRNG_END(caps->rx_range_list1[i]); i++)
{
rs->vfo_list |= rs->rx_range_list[i].vfo;
rs->mode_list |= rs->rx_range_list[i].modes;
rs->vfo_list |= caps->rx_range_list1[i].vfo;
rs->mode_list |= caps->rx_range_list1[i].modes;
}
for (i = 0; i < FRQRANGESIZ && !RIG_IS_FRNG_END(rs->tx_range_list[i]); i++)
for (i = 0; i < FRQRANGESIZ && !RIG_IS_FRNG_END(caps->tx_range_list1[i]); i++)
{
rs->vfo_list |= rs->tx_range_list[i].vfo;
rs->mode_list |= rs->tx_range_list[i].modes;
rs->vfo_list |= caps->tx_range_list1[i].vfo;
rs->mode_list |= caps->tx_range_list1[i].modes;
}
memcpy(rs->preamp, caps->preamp, sizeof(int)*MAXDBLSTSIZ);