Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re860_factory
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
waterword
re860_factory
Commits
d0cdc165
Commit
d0cdc165
authored
Oct 11, 2025
by
lyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:自动化测试更新功能返回信号最好的wifi
parent
88b34e27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
factoryTest_plugin/factory_autoFactoryTestUtil.js
factoryTest_plugin/factory_autoFactoryTestUtil.js
+13
-5
No files found.
factoryTest_plugin/factory_autoFactoryTestUtil.js
View file @
d0cdc165
...
...
@@ -127,13 +127,21 @@ function getWifiScan(value) {
console
.
log
(
"
value:
"
+
value
)
var
ssid
=
AnalyzeATSearchSsid
(
value
);
console
.
log
(
"
check ssid :
"
+
ssid
+
"
------
"
)
var
found
=
resultsWifiList
.
find
(
ap
=>
ap
.
name
==
ssid
);
if
(
found
)
{
return
`name:
${
found
.
name
}
,rssi:
${
found
.
rssi
}
,mac:
${
found
.
mac
}
`
;
}
else
{
// var found = resultsWifiList.find(ap => ap.name == ssid);
// if (found) {
// return `name:${found.name},rssi:${found.rssi},mac:${found.mac}`;
// }
// else {
// return "FAIL";
// }
var
matchingAPs
=
resultsWifiList
.
filter
(
ap
=>
ap
.
name
===
ssid
);
if
(
matchingAPs
.
length
===
0
)
{
return
"
FAIL
"
;
}
console
.
log
(
"
matchingAPs :
"
+
JSON
.
stringify
(
matchingAPs
)
+
"
------
"
)
var
bestAP
=
matchingAPs
.
sort
((
a
,
b
)
=>
b
.
rssi
-
a
.
rssi
)[
0
];
return
`name:
${
bestAP
.
name
}
,rssi:
${
bestAP
.
rssi
}
,mac:
${
bestAP
.
mac
}
`
;
}
function
writeSn
(
sn
)
{
userData
.
aboutSNValue
=
sn
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment