[chirp_devel] New Model #6421 TYT TH-350
Hi folks,
Just wrote a driver for TYT TH-350, based on the code for Baofeng UV-B5. Attached is the patch.
A test image, plus more details on the model, are available here: https://chirp.danplanet.com/issues/6421
Thanks, Zhaofeng Li
Hi Zhaofeng,
Just wrote a driver for TYT TH-350, based on the code for Baofeng UV-B5. Attached is the patch.
How similar is this driver to the UV-B5 itself? In general it's much better to subclass a driver if you have just a few changes. I haven't tried applying this and diff'ing them myself, but wanted to ask you first.
Thanks!
--Dan
Hi Zhaofeng,
Just wrote a driver for TYT TH-350, based on the code for Baofeng UV-B5. Attached is the patch.
How similar is this driver to the UV-B5 itself? In general it's much better to subclass a driver if you have just a few changes. I haven't tried applying this and diff'ing them myself, but wanted to ask you first.
Heh, right after I sent, I re-read your comment that there are more details in the issue. It sounds like there are some differences, but are they just around tone encoding and the clone protocol? If so, those are also easy to subclass and override. If many things are different, then it might make the most sense to just add a whole new driver. I just want to avoid senseless duplication _when_possible_.
Thanks!
--Dan
Hi Dan,
That sounds reasonable to me. I've made a couple of changes to the UV-B5 driver to make overriding easier, and the revised patchset is attached to this email.
Thanks, Zhaofeng Li
On Thu, Jan 31, 2019 at 11:02 AM Dan Smith via chirp_devel chirp_devel@intrepid.danplanet.com wrote:
Hi Zhaofeng,
Just wrote a driver for TYT TH-350, based on the code for Baofeng UV-B5. Attached is the patch.
How similar is this driver to the UV-B5 itself? In general it's much better to subclass a driver if you have just a few changes. I haven't tried applying this and diff'ing them myself, but wanted to ask you first.
Heh, right after I sent, I re-read your comment that there are more details in the issue. It sounds like there are some differences, but are they just around tone encoding and the clone protocol? If so, those are also easy to subclass and override. If many things are different, then it might make the most sense to just add a whole new driver. I just want to avoid senseless duplication _when_possible_.
Thanks!
--Dan _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
My apologies, but I found a silly error that I made during refactoring that broke VFO memories. Attached is the fixed changeset.
On Thu, Jan 31, 2019 at 1:40 PM Zhaofeng Li hello@zhaofeng.li wrote:
Hi Dan,
That sounds reasonable to me. I've made a couple of changes to the UV-B5 driver to make overriding easier, and the revised patchset is attached to this email.
Thanks, Zhaofeng Li
On Thu, Jan 31, 2019 at 11:02 AM Dan Smith via chirp_devel chirp_devel@intrepid.danplanet.com wrote:
Hi Zhaofeng,
Just wrote a driver for TYT TH-350, based on the code for Baofeng UV-B5. Attached is the patch.
How similar is this driver to the UV-B5 itself? In general it's much better to subclass a driver if you have just a few changes. I haven't tried applying this and diff'ing them myself, but wanted to ask you first.
Heh, right after I sent, I re-read your comment that there are more details in the issue. It sounds like there are some differences, but are they just around tone encoding and the clone protocol? If so, those are also easy to subclass and override. If many things are different, then it might make the most sense to just add a whole new driver. I just want to avoid senseless duplication _when_possible_.
Thanks!
--Dan _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
My apologies, but I found a silly error that I made during refactoring that broke VFO memories. Attached is the fixed changeset.
Okay, I applied it despite these style failures:
./chirp/drivers/th350.py:271:80: E501 line too long (93 > 79 characters) ./chirp/drivers/th350.py:340:23: E127 continuation line over-indented for visual indent ./chirp/drivers/th350.py:348:20: E127 continuation line over-indented for visual indent ./chirp/drivers/th350.py:349:20: E127 continuation line over-indented for visual indent ./chirp/drivers/th350.py:350:20: E127 continuation line over-indented for visual indent ./chirp/drivers/th350.py:361:49: E502 the backslash is redundant between brackets ./chirp/drivers/th350.py:365:48: E502 the backslash is redundant between brackets ./chirp/drivers/th350.py:372:21: E127 continuation line over-indented for visual indent
Can you submit a follow-up patch based on the current tip to correct these?
Thanks!
--Dan
Sure, attached is the patch.
Thanks, Zhaofeng Li
On Mon, Feb 4, 2019 at 11:33 AM Dan Smith via chirp_devel chirp_devel@intrepid.danplanet.com wrote:
My apologies, but I found a silly error that I made during refactoring that broke VFO memories. Attached is the fixed changeset.
Okay, I applied it despite these style failures:
./chirp/drivers/th350.py:271:80: E501 line too long (93 > 79 characters) ./chirp/drivers/th350.py:340:23: E127 continuation line over-indented for visual indent ./chirp/drivers/th350.py:348:20: E127 continuation line over-indented for visual indent ./chirp/drivers/th350.py:349:20: E127 continuation line over-indented for visual indent ./chirp/drivers/th350.py:350:20: E127 continuation line over-indented for visual indent ./chirp/drivers/th350.py:361:49: E502 the backslash is redundant between brackets ./chirp/drivers/th350.py:365:48: E502 the backslash is redundant between brackets ./chirp/drivers/th350.py:372:21: E127 continuation line over-indented for visual indent
Can you submit a follow-up patch based on the current tip to correct these?
Thanks!
--Dan _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
participants (2)
-
Dan Smith
-
Zhaofeng Li