Fix d868uv issues.

This commit is contained in:
Serge Vakulenko 2018-11-05 12:42:55 -08:00
parent 9b23f33e0d
commit 63c3a389a0
4 changed files with 1976 additions and 2 deletions

View File

@ -1465,7 +1465,7 @@ static void setup_channel(int i, int mode, char *name, double rx_mhz, double tx_
ch->tx_offset = mhz_to_ghefcdab(rx_mhz - tx_mhz);
} else {
ch->repeater_mode = RM_SIMPLEX;
ch->tx_offset = 0;
ch->tx_offset = 0x00000100;
}
ch->channel_mode = mode;
@ -1478,6 +1478,7 @@ static void setup_channel(int i, int mode, char *name, double rx_mhz, double tx_
ch->contact_index = contact - 1;
ch->scan_list_index = scanlist - 1;
ch->group_list_index = grouplist - 1;
ch->custom_ctcss = 251.1 * 10;
// rxtone and txtone are positive for DCS and negative for CTCSS.
if (rxtone > 0) { // Receive DCS
@ -1490,6 +1491,7 @@ static void setup_channel(int i, int mode, char *name, double rx_mhz, double tx_
ch->custom_ctcss = -rxtone;
}
}
if (txtone > 0) { // Transmit DCS
ch->tx_dcs = 1;
ch->dcs_transmit = txtone - 1;
@ -1841,7 +1843,7 @@ badtx: fprintf(stderr, "Bad transmit frequency.\n");
}
setup_channel(num-1, MODE_ANALOG, name_str, rx_mhz, tx_mhz,
power, scanlist, rxonly, admit, 1, 1,
power, scanlist, rxonly, admit, 0, 1,
0, 0, rxtone, txtone, width);
radio->channel_count++;

View File

@ -19,6 +19,7 @@ CONF = md2017-7-23-2017.conf \
gd77-empty.conf \
gd77-factory.conf \
d868uv-rmham-2018-10-20.conf \
d868uv-norcal-ka7qqv-2017-11-04.conf \
d868uv-empty.conf
VPATH = ../../dmrconfig.wiki/files/uv380 \

File diff suppressed because it is too large Load Diff

9
util.c
View File

@ -231,6 +231,11 @@ void print_unicode(FILE *out, const unsigned short *text, unsigned nchars, int f
{
unsigned i, ch;
if ((*text == 0xff || *text == 0) && fill_flag) {
// When text is empty, still print something.
unsigned short underscore[2] = { '_', 0 };
text = underscore;
}
for (i=0; i<nchars && *text; i++) {
ch = *text++;
if (ch == '\t')
@ -254,6 +259,10 @@ void print_ascii(FILE *out, const unsigned char *text, unsigned nchars, int fill
{
unsigned i, ch;
if ((*text == 0xff || *text == 0) && fill_flag) {
// When text is empty, still print something.
text = (const unsigned char*) "_";
}
for (i=0; i<nchars && *text != 0xff && *text != 0; i++) {
ch = *text++;
if (ch == '\t')