hmatuschek / qdmr

A GUI application for configuring and programming cheap DMR radios under Linux and MacOS X.
https://dm3mat.darc.de/qdmr/
GNU General Public License v3.0
216 stars 45 forks source link

d878uv conf gps table error #86

Closed nathwill closed 3 years ago

nathwill commented 3 years ago

first, thanks for this project, it's been a great help programming this dmr radio :)

i get a problem when working with it, however.

steps to reproduce:

1) read the codeplug from the radio 2) save to disk 3) close out qdmr and reopen it 4) read the saved codeplug from disk 5) observe error about unexpected token like Cannot read codeplug from file '/home/nathwill/radio/anytone-d878uv-oregon.conf': Parse error @ 122,6: Unexpected token 3 '2'.

relevant section from the codeplug conf file:

# Table of GPS systems.
# 1) GPS system ID
# 2) Name in quotes.
# 3) Destination contact ID.
# 4) Update period: period in ms
# 5) Revert channel ID or '-'.
#
GPS  Name                Dest Period Revert
1    "GPS Sys #1"        2    0      -     
     2    "GPS Sys #2"        2    0      -     
     3    "GPS Sys #3"        2    0      -     
     4    "GPS Sys #4"        2    0      -     
     5    "GPS Sys #5"        2    0      -     
     6    "GPS Sys #6"        2    0      -     
     7    "GPS Sys #7"        2    0      -     
     8    "GPS Sys #8"        2    0      -     

it looks like there's an extra tab inserted after the newline in the gps table formatting?

nathwill commented 3 years ago

i've been working around this by deleting the gps table from the saved codeplug, then i can open it in qdmr and write it out to the radio without issue, but maybe a bad idea? :man_shrugging:

hmatuschek commented 3 years ago

No it is a bug on my side. Try deleting the tab char before the numbers. There is an issue with the conf writer and parser. The writer should not put these chars there and the parser should ignore them.