kopia lustrzana https://github.com/Hamlib/Hamlib
Fix kenwood AG command to use vfo+level format instead of just level
Some rigs say 0 is the default and need to find out if 1 causes an error If it does we need to have rig exceptions -- hopefully it's ignored https://github.com/Hamlib/Hamlib/issues/304pull/312/head
rodzic
362fa77cfd
commit
779cd69287
|
@ -724,6 +724,7 @@ int kenwood_open(RIG *rig)
|
|||
rig_debug(RIG_DEBUG_TRACE, "%s: got PS0 so powerup\n", __func__);
|
||||
rig_set_powerstat(rig, 1);
|
||||
}
|
||||
|
||||
priv->poweron = 1;
|
||||
|
||||
err = RIG_OK; // reset our err back to OK for later checks
|
||||
|
@ -2153,8 +2154,14 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
break;
|
||||
|
||||
case RIG_LEVEL_AF:
|
||||
snprintf(levelbuf, sizeof(levelbuf), "AG%03d", kenwood_val);
|
||||
break;
|
||||
{
|
||||
// some rigs only recognize 0 for vfo_set
|
||||
// hopefully they are asking for VFOA or Main otherwise this might not work
|
||||
// https://github.com/Hamlib/Hamlib/issues/304
|
||||
int vfo_set = vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN ? 0 : 1;
|
||||
snprintf(levelbuf, sizeof(levelbuf), "AG%1d%03d", vfo_set, kenwood_val);
|
||||
}
|
||||
break;
|
||||
|
||||
case RIG_LEVEL_RF:
|
||||
/* XXX check level range */
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <string.h>
|
||||
#include "token.h"
|
||||
|
||||
#define BACKEND_VER "20200614"
|
||||
#define BACKEND_VER "20200615"
|
||||
|
||||
#define EOM_KEN ';'
|
||||
#define EOM_TH '\r'
|
||||
|
|
Ładowanie…
Reference in New Issue