diff --git a/kenwood/elecraft.h b/kenwood/elecraft.h index d581c74dd..fa9d0d8c0 100644 --- a/kenwood/elecraft.h +++ b/kenwood/elecraft.h @@ -69,5 +69,31 @@ extern const struct confparams elecraft_ext_levels[]; /* Elecraft extension function declarations */ int elecraft_open(RIG *rig); +/* S-meter calibration tables */ + +/* K3 defines 16 values--0-15. + * Table is RASTR value from SM command and dB relative to S9 == 0 + * (see rig_get_level() in src/settings.c + */ +#define K3_STR_CAL { 16, \ + { \ + { 0, -54 }, \ + { 1, -42 }, \ + { 2, -36 }, \ + { 3, -24 }, \ + { 4, -12 }, \ + { 5, -6 }, \ + { 6, 0 }, \ + { 7, 10 }, \ + { 8, 15 }, \ + { 9, 20 }, \ + { 10, 30 }, \ + { 11, 35 }, \ + { 12, 40 }, \ + { 13, 50 }, \ + { 14, 55 }, \ + { 15, 60 }, \ + } } + #endif /* _ELECRAFT_H */ diff --git a/kenwood/k3.c b/kenwood/k3.c index 0e3d7cfaa..025a9c101 100644 --- a/kenwood/k3.c +++ b/kenwood/k3.c @@ -42,7 +42,7 @@ #define K3_LEVEL_ALL (RIG_LEVEL_ATT|RIG_LEVEL_PREAMP|RIG_LEVEL_AGC|RIG_LEVEL_SQL|\ RIG_LEVEL_STRENGTH|RIG_LEVEL_RFPOWER|RIG_LEVEL_KEYSPD|\ - RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_MICGAIN) + RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_MICGAIN|RIG_LEVEL_RAWSTR) #define K3_VFO (RIG_VFO_A|RIG_VFO_B) #define K3_VFO_OP (RIG_OP_UP|RIG_OP_DOWN) @@ -183,6 +183,7 @@ const struct rig_caps k3_caps = { {RIG_MODE_FM, kHz(13)}, /* TBC */ RIG_FLT_END, }, + .str_cal = K3_STR_CAL, .priv = (void *)&k3_priv_caps, .rig_init = kenwood_init,