kopia lustrzana https://github.com/Hamlib/Hamlib
Added two more targetable flags for MEM and BANK to avoid VFO swapping
https://github.com/Hamlib/Hamlib/issues/430 https://github.com/Hamlib/Hamlib/issues/414pull/435/head
rodzic
74356b3a99
commit
5721db70be
|
@ -459,7 +459,7 @@ typedef unsigned int vfo_t;
|
|||
* RIG_TARGETABLE_PURE means a pure targetable radio on every command
|
||||
* In rig.c lack of a flag will case a VFO change if needed
|
||||
* So setting this flag will mean the backend handles any VFO needs
|
||||
* For many rigs RITXIT and PTT are non-VFO commands so need these flags
|
||||
* For many rigs RITXIT, PTT, MEM, and BANK are non-VFO commands so need these flags to avoid unnecessary VFO swapping
|
||||
*/
|
||||
//! @cond Doxygen_Suppress
|
||||
#define RIG_TARGETABLE_NONE 0
|
||||
|
@ -471,6 +471,8 @@ typedef unsigned int vfo_t;
|
|||
#define RIG_TARGETABLE_LEVEL (1<<5)
|
||||
#define RIG_TARGETABLE_RITXIT (1<<6)
|
||||
#define RIG_TARGETABLE_PTT (1<<7)
|
||||
#define RIG_TARGETABLE_MEM (1<<8)
|
||||
#define RIG_TARGETABLE_BANK (1<<9)
|
||||
#define RIG_TARGETABLE_ALL 0x7fffffff
|
||||
//! @endcond
|
||||
//
|
||||
|
|
|
@ -817,7 +817,8 @@ icom_rig_open(RIG *rig)
|
|||
// All Icom rigs as of 20201031 do not need VFO switch for PTT and RITXIT
|
||||
// They are non-VFO specific commands
|
||||
// If they ever become VFO specific implement in the backend
|
||||
rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT;
|
||||
rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT |
|
||||
RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK;
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
|
|
@ -942,7 +942,8 @@ int kenwood_open(RIG *rig)
|
|||
// They are non-VFO specific commands
|
||||
// If they ever become VFO specific implement in the backend
|
||||
|
||||
rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT;
|
||||
rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT |
|
||||
RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK;
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -533,7 +533,8 @@ int newcat_open(RIG *rig)
|
|||
// They are non-VFO specific commands
|
||||
// A couple of rigs do have vfo-specific in the backends
|
||||
// If they ever become VFO specific implement in the backend
|
||||
rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT;
|
||||
rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT |
|
||||
RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK;
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ int HAMLIB_API rig_set_mem(RIG *rig, vfo_t vfo, int ch)
|
|||
return -RIG_ENAVAIL;
|
||||
}
|
||||
|
||||
if ((caps->targetable_vfo & RIG_TARGETABLE_PURE)
|
||||
if ((caps->targetable_vfo & RIG_TARGETABLE_MEM)
|
||||
|| vfo == RIG_VFO_CURR
|
||||
|| vfo == rig->state.current_vfo)
|
||||
{
|
||||
|
@ -152,7 +152,7 @@ int HAMLIB_API rig_get_mem(RIG *rig, vfo_t vfo, int *ch)
|
|||
return -RIG_ENAVAIL;
|
||||
}
|
||||
|
||||
if ((caps->targetable_vfo & RIG_TARGETABLE_PURE)
|
||||
if ((caps->targetable_vfo & RIG_TARGETABLE_MEM)
|
||||
|| vfo == RIG_VFO_CURR
|
||||
|| vfo == rig->state.current_vfo)
|
||||
{
|
||||
|
@ -215,7 +215,7 @@ int HAMLIB_API rig_set_bank(RIG *rig, vfo_t vfo, int bank)
|
|||
return -RIG_ENAVAIL;
|
||||
}
|
||||
|
||||
if ((caps->targetable_vfo & RIG_TARGETABLE_PURE)
|
||||
if ((caps->targetable_vfo & RIG_TARGETABLE_BANK)
|
||||
|| vfo == RIG_VFO_CURR
|
||||
|| vfo == rig->state.current_vfo)
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue