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
223 stars 46 forks source link

OpenGD77 enforcing/overwriting time slot override on contacts #127

Closed pe1rrr closed 3 years ago

pe1rrr commented 3 years ago

Hello,

It seems that with the latest OpenGD77 firmware from July 11th 2021 that when writing the code plug to the device there is a conflict with a newly introduced feature that allows a user to specify a time slot on a per-contact basis.

The default of this contact-setting should be "None" but qdmr is setting this to time slot "1" on all contacts sent to the radio.

This can cause broken/confusing behavior on the radio as each contact selected will ignore the TS1/TS2 toggle in OpenGD77 rendering it only operational on TS1.

Contacts uploaded to the radio have to be edited manually on the radio to set their timeslot setting to "None" so that they no longer override the system default.

I can provide further info if needed, let me know what you need.

hmatuschek commented 3 years ago

This time-slot override element is already in the codeplug https://github.com/hmatuschek/qdmr/blob/060e1ae41d6b6d344299d38af514af2c1f60bdd6/lib/opengd77_codeplug.hh#L272 and gets set to 0x00 (Off/None). Maybe the encoding of this option has changed with the new firmware. I'll check this.

hmatuschek commented 3 years ago

Ok, found it. I believe there was an issue all the time. The time-slot override was encoded in a weird way. https://github.com/open-ham/OpenGD77CPS/blob/7f843dcff4b1ac987fcd366d2dd2abbaafac35ef/DMR/ContactForm.cs#L171 It all depends on the bit b0 (least significant bit). If it is 1, the override is disabled. If it is 0, it depends on b1. b1=0 => TS1, b1=1 => TS2.