Skip to content

Commit

Permalink
Modify baud rate handling for W232N and W55RP20-S2E
Browse files Browse the repository at this point in the history
  • Loading branch information
dbtjr1103 committed Sep 9, 2024
1 parent 83fd91a commit fe37d64
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
10 changes: 9 additions & 1 deletion main_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def object_config_for_device(self):
# WIZ5XX v1.0.8 이상은 modbus 사용 가능 #36
else:
self.modbus_protocol.setEnabled(True)
if "WIZ750" in self.curr_dev:
if "WIZ750" in self.curr_dev or "W232N" in self.curr_dev:
if version_compare("1.2.0", self.curr_ver) <= 0:
# setcmd['TR'] = self.tcp_timeout.text()
self.tcp_timeout.setEnabled(True)
Expand All @@ -609,9 +609,16 @@ def object_config_for_device(self):

# 20221208 Modify baud rate temperarily
self.ch1_baud.removeItem(14)
self.ch1_baud.removeItem(15)
elif "W55RP20-S2E" in self.curr_dev:
# W55RP20-S2E의 경우 921600 baud rate 옵션 추가
if self.ch1_baud.count() == 15:
self.ch1_baud.insertItem(15, "921600")
else:
if self.ch1_baud.count() == 14:
self.ch1_baud.insertItem(14, "460800")
self.ch1_baud.removeItem(15)


# SC: Status pin option
if "WIZ107" in self.curr_dev or "WIZ108" in self.curr_dev:
Expand Down Expand Up @@ -3082,3 +3089,4 @@ def __del__(self):
wizwindow = WIZWindow()
wizwindow.show()
app.exec_()

2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.6
1.5.6.1
3 changes: 2 additions & 1 deletion wizcmdset.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"LP": ["Local port number", port_pattern, {}, "RW"],
"RH": ["Remote Host IP address", ip_pattern, {}, "RW"],
"RP": ["Remote Host Port number", port_pattern, {}, "RW"],
"BR": ["UART Baud rate", "^([0-9]|1[0-4])$", baudrate_option, "RW"],
"BR": ["UART Baud rate", "^([0-9]|1[0-5])$", baudrate_option, "RW"],
"DB": ["UART Data bit length", "^[0-1]$", {"0": "7-bit", "1": "8-bit"}, "RW"],
"PR": ["UART Parity bit", "^[0-2]$", {"0": "NONE", "1": "ODD", "2": "EVEN"}, "RW"],
"SB": ["UART Stop bit length", "^[0-1]$", {"0": "1-bit", "1": "2-bit"}, "RW"],
Expand Down Expand Up @@ -312,3 +312,4 @@ def iswritable(self, cmdstr):
print(wizcmdset.getparamdescription(cmd, "2B2C2D"))

print(wizcmdset.isvalidparameter(cmd, "192.168.11.3"))

0 comments on commit fe37d64

Please sign in to comment.