Skip to content

Commit

Permalink
Removed unnecessary lines and fixed some bugs
Browse files Browse the repository at this point in the history
Fixed bugs:
- work modes for channel a and b were swapped
  • Loading branch information
vdwel authored and kk7ds committed Nov 24, 2023
1 parent 3c1ff5b commit c315781
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions chirp/drivers/baofeng_uv17Pro.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@
CHARSET_GB2312 += bytes([x, y]).decode('gb2312')


TXP_CHOICES = ["High", "Low"]
TXP_VALUES = [0x00, 0x02]

STIMEOUT = 1.5


def model_match(cls, data):
"""Match the opened image to the correct version"""
return data[cls.MEM_TOTAL:] == bytes(cls.MODEL, 'utf-8')
Expand Down Expand Up @@ -258,7 +252,6 @@ class UV17Pro(baofeng_common.BaofengCommonHT):

MEM_TOTAL = 0x8380
BLOCK_SIZE = 0x40
STIMEOUT = 2
BAUD_RATE = 115200

_gmrs = False
Expand Down Expand Up @@ -318,20 +311,20 @@ class UV17Pro(baofeng_common.BaofengCommonHT):
lbcd txfreq[4];
ul16 rxtone;
ul16 txtone;
u8 scode:8;
u8 pttid:8;
u8 lowpower:8;
u8 scode;
u8 pttid;
u8 lowpower;
u8 unknown1:1,
wide:1,
sqmode:2,
bcl:1,
scan:1,
unknown2:1,
fhss:1;
u8 unknown3:8;
u8 unknown4:8;
u8 unknown5:8;
u8 unknown6:8;
u8 unknown3;
u8 unknown4;
u8 unknown5;
u8 unknown6;
char name[12];
} memory[1000];
Expand Down Expand Up @@ -390,8 +383,8 @@ class UV17Pro(baofeng_common.BaofengCommonHT):
u8 roger;
u8 unknown2;
u8 fmenable;
u8 chaworkmode:4,
chbworkmode:4;
u8 chbworkmode:4,
chaworkmode:4;
u8 keylock;
u8 powerondistype;
u8 tone;
Expand Down Expand Up @@ -430,7 +423,7 @@ class UV17Pro(baofeng_common.BaofengCommonHT):
struct {
u8 code[5];
u8 name[10];
u8 unused:8;
u8 unused;
} pttid[20];
#seekto 0x8280;
Expand Down

0 comments on commit c315781

Please sign in to comment.