Fix TS-2000 flicker during RFPOWER request -- only check min/max when mode changes

https://github.com/Hamlib/Hamlib/issues/1595
pull/1596/head
Mike Black W9MDB 2024-08-15 17:15:02 -05:00
rodzic 64518dac35
commit 4aff005665
2 zmienionych plików z 11 dodań i 3 usunięć

Wyświetl plik

@ -3311,9 +3311,17 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_RFPOWER:
{
static mode_t mode = RIG_MODE_NONE;
int power_now, power_min, power_max;
// Power min/max can vary so we query to find them out every time
retval = kenwood_get_power_minmax(rig, &power_now, &power_min, &power_max, 0);
pbwidth_t twidth;
int err = rig_get_mode(rig, vfo, &priv->curr_mode, &twidth);
// https://github.com/Hamlib/Hamlib/issues/1595
if (!err && priv->curr_mode != mode) // only need to check when mode changes
{
mode = priv->curr_mode;
// Power min/max can vary so we query to find them out every time
retval = kenwood_get_power_minmax(rig, &power_now, &power_min, &power_max, 0);
}
if (retval != RIG_OK) { RETURNFUNC(retval); }

Wyświetl plik

@ -28,7 +28,7 @@
#include "token.h"
#include "idx_builtin.h"
#define BACKEND_VER "20240807"
#define BACKEND_VER "20240815"
#define EOM_KEN ';'
#define EOM_TH '\r'