Add range_list to xg3.c

pull/224/head
Michael Black 2020-03-25 23:32:56 -05:00
rodzic 9e89c4455a
commit 0c8130db00
2 zmienionych plików z 26 dodań i 2 usunięć

Wyświetl plik

@ -142,6 +142,11 @@ const struct rig_caps xg3_caps =
{0, 11, RIG_MTYPE_MEM, XG3_CHANNEL_CAPS},
RIG_CHAN_END,
},
.tx_range_list1 = { // lo power is actually 5e-14W which can't be represented in hamlib as of 20200325
{kHz(1500), MHz(200), RIG_MODE_CW, 0, 2, RIG_VFO_A, RIG_ANT_1},
RIG_FRNG_END,
},
.priv = (void *)& xg3_priv_caps,

Wyświetl plik

@ -896,8 +896,27 @@ void range_print(FILE *fout, const struct freq_range_list range_list[], int rx)
if (!rx)
{
fprintf(fout, "\t\tLow power: %g W, High power: %g W\n",
range_list[i].low_power / 1000.0f, range_list[i].high_power / 1000.0f);
char *label_lo = "W";
char *label_hi = "W";
double low = range_list[i].low_power / 1000.0f;
double hi = range_list[i].high_power / 1000.0f;
if (low < 0) {
label_lo = "mW";
low *= 1000;
}
if (low < 0) {
label_lo = "uW";
low *= 1000;
}
if (hi < 0) {
label_hi = "mW";
hi *= 1000;
}
if (hi < 0) {
label_hi = "uW";
hi *= 1000;
}
fprintf(fout, "\t\tLow power: %g %s, High power: %g %s\n", low, label_lo, hi, label_hi);
}
}
}