diff --git a/chirp/drivers/baofeng_uv17.py b/chirp/drivers/baofeng_uv17.py index 09b7da0e..52cd3219 100644 --- a/chirp/drivers/baofeng_uv17.py +++ b/chirp/drivers/baofeng_uv17.py @@ -196,7 +196,7 @@ class UV17(baofeng_uv17Pro.UV17Pro): LIST_MODE = ["Name", "Frequency"] CHANNELS = 999 - MEM_DEFS = """ + CHANNEL_DEF = """ struct channel { lbcd rxfreq[4]; lbcd txfreq[4]; @@ -215,6 +215,8 @@ class UV17(baofeng_uv17Pro.UV17Pro): scan:1; u8 unknown4; }; + """ + MEM_DEFS = """ struct channelname { char name[11]; }; @@ -320,7 +322,7 @@ class UV17(baofeng_uv17Pro.UV17Pro): struct ani ani; """ - MEM_FORMAT = MEM_DEFS + MEM_LAYOUT + MEM_FORMAT = CHANNEL_DEF + MEM_DEFS + MEM_LAYOUT def _make_frame(self, cmd, addr, length, data=""): """Pack the info in the header format""" diff --git a/chirp/drivers/ga510.py b/chirp/drivers/ga510.py index 13d426e8..1642a901 100644 --- a/chirp/drivers/ga510.py +++ b/chirp/drivers/ga510.py @@ -1141,6 +1141,26 @@ class RadioddityGA510v2(baofeng_uv17.UV17): LIST_MODE = ["Name", "Frequency"] CHANNELS = 128 + CHANNEL_DEF = """ + struct channel { + lbcd rxfreq[4]; + lbcd txfreq[4]; + u8 unused1; + ul16 rxtone; + ul16 txtone; + u8 unknown1:1, + bcl:1, + pttid:2, + unknown2:1, + wide:1, + lowpower:2; + u8 scode:4, + unknown3:3, + scan:1; + u8 unknown4; + }; + """ + MEM_LAYOUT = """ #seekto 0x1000; struct settings settings; @@ -1157,6 +1177,6 @@ class RadioddityGA510v2(baofeng_uv17.UV17): #seekto 0x400B; struct channelname names1[128]; """ - MEM_FORMAT = baofeng_uv17.UV17.MEM_DEFS + MEM_LAYOUT + MEM_FORMAT = CHANNEL_DEF + baofeng_uv17.UV17.MEM_DEFS + MEM_LAYOUT _has_workmode_support = False