kopia lustrzana https://github.com/Hamlib/Hamlib
fixes for kenwood backends
rodzic
fbef95f30f
commit
e156ef65fb
|
@ -1658,7 +1658,11 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
|
||||
switch (level) {
|
||||
case RIG_LEVEL_RFPOWER:
|
||||
/* XXX check level range */
|
||||
/*
|
||||
* Best estimate: 1.0 corresponds to 100W
|
||||
* Anything better must be done in rig-specific files.
|
||||
*/
|
||||
if (RIG_LEVEL_IS_FLOAT(level)) kenwood_val = val.f * 100;
|
||||
sprintf(levelbuf, "PC%03d", kenwood_val);
|
||||
break;
|
||||
|
||||
|
@ -2728,9 +2732,22 @@ int kenwood_send_morse(RIG *rig, vfo_t vfo, const char *msg)
|
|||
|
||||
while(msg_len > 0) {
|
||||
/*
|
||||
* TODO: check with "KY" if char buffer is available.
|
||||
* if not, sleep.
|
||||
*
|
||||
* Check with "KY" if char buffer is available.
|
||||
* if not, sleep.
|
||||
*/
|
||||
for (;;) {
|
||||
retval = kenwood_transaction(rig, "KY;", m2, 4);
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
/*
|
||||
* If answer is "KY0;", there is space in buffer and we can proceed.
|
||||
* If answer is "KY1;", we have to wait a while
|
||||
* If answer is something else, return with error to prevent infinite loops
|
||||
*/
|
||||
if (!strncmp(m2,"KY0", 3)) break;
|
||||
if (!strncmp(m2,"KY1", 3)) usleep(500000); else return -RIG_EINVAL;
|
||||
}
|
||||
/*
|
||||
* Make the total message segments 28 characters
|
||||
* in length because Kenwood demands it.
|
||||
* Spaces fill in the message end.
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#define TS570_FUNC_ALL (RIG_FUNC_FAGC|RIG_FUNC_TSQL|RIG_FUNC_TONE|RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_NR|RIG_FUNC_LOCK|RIG_FUNC_BC|RIG_FUNC_TUNER)
|
||||
|
||||
#define TS570_LEVEL_ALL (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_SQL|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_SLOPE_LOW|RIG_LEVEL_SLOPE_HIGH)
|
||||
#define TS570_LEVEL_ALL (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_SQL|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_SLOPE_LOW|RIG_LEVEL_SLOPE_HIGH|RIG_LEVEL_KEYSPD)
|
||||
|
||||
#define TS570_VFO (RIG_VFO_A|RIG_VFO_B)
|
||||
#define TS570_VFO_OP (RIG_OP_UP|RIG_OP_DOWN)
|
||||
|
|
|
@ -41,7 +41,7 @@ const char* ts590_get_info(RIG *rig);
|
|||
|
||||
#define TS590_LEVEL_ALL (RIG_LEVEL_RFPOWER|RIG_LEVEL_AF|RIG_LEVEL_RF|\
|
||||
RIG_LEVEL_CWPITCH|RIG_LEVEL_METER|RIG_LEVEL_SWR|RIG_LEVEL_ALC|\
|
||||
RIG_LEVEL_SQL|RIG_LEVEL_AGC|RIG_LEVEL_STRENGTH)
|
||||
RIG_LEVEL_SQL|RIG_LEVEL_AGC|RIG_LEVEL_STRENGTH|RIG_LEVEL_KEYSPD)
|
||||
#define TS590_FUNC_ALL (RIG_FUNC_LOCK|RIG_FUNC_AIP|RIG_FUNC_TONE|\
|
||||
RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_NR|RIG_FUNC_NR|RIG_FUNC_BC)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue