Skip to content

Commit 865f565

Browse files
Williangalvanipatrickelectric
authored andcommitted
core: fix wrong usage of 'udpclient' instead of 'udp' for serial ports
1 parent 8de898e commit 865f565

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/frontend/src/components/autopilot/AutopilotSerialConfiguration.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export default Vue.extend({
175175
}
176176
}
177177
}
178-
const regex1 = /(tcpclient|udpclient|tcpin|udpin):(?<ip>[^:]+):(?<port>\d+)$/
178+
const regex1 = /(tcpclient|udp|tcpin|udpin):(?<ip>[^:]+):(?<port>\d+)$/
179179
if (regex1.test(input)) {
180180
const match = regex1.exec(input)
181181
const ip = match?.groups?.ip ?? ''
@@ -200,7 +200,7 @@ export default Vue.extend({
200200
if (input.startsWith('/dev/')) {
201201
return true
202202
}
203-
return 'unknown format. Supported formats are "tcpclient", "udpclient", "tcpin", "udpin", and system device paths'
203+
return 'unknown format. Supported formats are "tcpclient", "udp", "tcpin", "udpin", and system device paths'
204204
},
205205
},
206206
})

core/services/ardupilot_manager/typedefs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def valid_endpoint(cls: Any, value: str) -> str:
200200
return value
201201
if re.compile(r"tcp:\d*:wait$").match(value):
202202
return value
203-
matches = re.compile(r"(tcpclient|udpclient|tcpin|udpin):(?P<ip>(\d*\.){3}\d+):(?P<port>\d*)$").match(value)
203+
matches = re.compile(r"(tcpclient|udp|tcpin|udpin):(?P<ip>(\d*\.){3}\d+):(?P<port>\d*)$").match(value)
204204
if matches:
205205
ipaddress.ip_address(matches.group("ip"))
206206
if 0 <= int(matches.group("port")) <= 65535:

0 commit comments

Comments
 (0)