OpenRTX / dmrconfig

Configuration utility for DMR radios
BSD 3-Clause "New" or "Revised" License
240 stars 56 forks source link

GD-77 cross-ban digital channel, format error (includes fix) #48

Open vk2sky opened 4 years ago

vk2sky commented 4 years ago

I only discovered this by accident, as the code plug a fellow Amateur gave me had a channel incorrectly programmed with tx and rx frequencies in different bands. As a result, device.conf contains this:.

:
486   IPW3807          146.1875  +0.6     High  1    -   -  -      1     2    9    9    # VK7 3807
487   IPW3809          146.1875   431.8375High  1    -   -  -      1     1    10   10   # VK UA 3809

Line 487 has one space too many before the Tx frequency, and one too few after. Trying to burn this back into the radio throws a parsing error.

A simple fix is, in util.c:

void print_offset(FILE *out, unsigned rx_bcd, unsigned tx_bcd)
{
    :
    :
   } else {
        /* fprintf(out, " ");    MOVE THIS LINE... */
        print_mhz(out, tx_hz);
        fprintf(out, " ");   /* ...DOWN TO HERE */
    }
}

I would have submitted a PR, but seem to be having GitHub permissions problems at the moment.

73 Richard VK2SKY