Add some debug for set_mode stuff

(cherry picked from commit 18e9d56b47)
Hamlib-4.0
Michael Black W9MDB 2020-12-22 17:01:06 -06:00 zatwierdzone przez Nate Bargmann
rodzic 9d6e0fb730
commit e53d1092de
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: F72625E2EDBED598
2 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -637,7 +637,7 @@ rmode_t kenwood2rmode(unsigned char mode, const rmode_t mode_table[])
char rmode2kenwood(rmode_t mode, const rmode_t mode_table[]) char rmode2kenwood(rmode_t mode, const rmode_t mode_table[])
{ {
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); rig_debug(RIG_DEBUG_VERBOSE, "%s called, mode=%s\n", __func__, rig_strrmode(mode));
if (mode != RIG_MODE_NONE) if (mode != RIG_MODE_NONE)
{ {
@ -647,6 +647,7 @@ char rmode2kenwood(rmode_t mode, const rmode_t mode_table[])
{ {
if (mode_table[i] == mode) if (mode_table[i] == mode)
{ {
rig_debug(RIG_DEBUG_VERBOSE, "%s: returning %d\n", __func__, i);
return i; return i;
} }
} }
@ -1839,7 +1840,7 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
struct kenwood_priv_caps *caps = kenwood_caps(rig); struct kenwood_priv_caps *caps = kenwood_caps(rig);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s, width=%d\n", __func__, rig_strvfo(vfo), rig_strrmode(mode), (int)width);
if (RIG_IS_TS590S || RIG_IS_TS590SG || RIG_IS_TS950S || RIG_IS_TS950SDX) if (RIG_IS_TS590S || RIG_IS_TS590SG || RIG_IS_TS950S || RIG_IS_TS950SDX)
{ {
@ -1891,6 +1892,7 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
{ {
c = 'A' + kmode - 10; c = 'A' + kmode - 10;
} }
rig_debug(RIG_DEBUG_VERBOSE, "%s: kmode=%d, cmode=%c\n", __func__, kmode, c);
if (RIG_IS_TS990S) if (RIG_IS_TS990S)
{ {

Wyświetl plik

@ -1727,7 +1727,7 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
const struct rig_caps *caps; const struct rig_caps *caps;
int retcode; int retcode;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s, width=%d\n", __func__, rig_strvfo(vfo), rig_strrmode(mode), (int)width);
if (CHECK_RIG_ARG(rig)) if (CHECK_RIG_ARG(rig))
{ {