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
740368c8
Commit
740368c8
authored
Oct 17, 2025
by
lyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:增加读取屏幕模组信息方式
parent
675b8055
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
3 deletions
+36
-3
factoryTest_plugin/factory_testSystemInfo.js
factoryTest_plugin/factory_testSystemInfo.js
+36
-3
No files found.
factoryTest_plugin/factory_testSystemInfo.js
View file @
740368c8
...
...
@@ -81,7 +81,7 @@ function checkAutoFactory() {
// 获取系统信息
function
updateSystemInfo
()
{
console
.
log
(
"
!updateSystemInfo
"
);
// var total = getTotalStorageInfo();
// total.totalSizeMB
...
...
@@ -115,7 +115,7 @@ function updateSystemInfo() {
systemInfo
.
wifiMac
=
getWifiInfo
(
"
address
"
);
systemInfo
.
licenseRegistered
=
(
checkLicense
()
==
1
?
"
Pass
"
:
"
NG
"
);
// 需根据实际实现
systemInfo
.
wifiIp
=
getWifiInfo
(
"
ip_address
"
);
//前提wifi要连接
systemInfo
.
screenVendor
=
get
Screen
Vendor
();
// 需根据实际实现
systemInfo
.
screenVendor
=
get
Touch
Vendor
();
// 需根据实际实现
systemInfo
.
ddrFrequency
=
getDDRFrequency
();
systemInfo
.
sn
=
handleSNDataBinFile
.
readStrFromBinFile
()
||
"
NG
"
;
systemInfo
.
tpVersion
=
getTPVersion
()
||
"
NG
"
;
...
...
@@ -126,7 +126,7 @@ function updateSystemInfo() {
systemInfo
.
wifiModel
=
"
AP62212
"
;
// 示例值
...
...
@@ -452,6 +452,9 @@ function getTPVersionOld() {
return
"
NG
"
;
// 如果未找到有效数据,返回 "NG"
}
function
getTPVersionNew
()
{
// 执行系统命令,将设备信息保存到临时文件
var
checkVersionPath
=
"
../../../../..
"
+
"
/sys/devices/platform/soc@3000000/2502800.twi/i2c-2/2-0055/stinform
"
;
...
...
@@ -502,6 +505,36 @@ function getScreenVendor() {
}
}
/**
* 获取触控模组厂商(Bus=0018 对应 Name 字段)
* 必须先写临时文件再读取
* @returns {string} 引号内原样字符串 或 "NG"
*/
function
getTouchVendor
()
{
const
procFile
=
'
/proc/bus/input/devices
'
;
const
tmpFile
=
'
/tmp/tp_vendor.txt
'
;
/* ---- 1. 源文件存在性检查 ---- */
if
(
!
fs
.
exists
(
"
../../../../..
"
+
procFile
))
return
'
NG
'
;
/* ---- 2. 抽 Bus=0018 段 -> 拿 Name 行 -> 解析引号内容 ---- */
const
cmd
=
`sed -n '/^I: Bus=0018/,/^$/p' "
${
procFile
}
" | `
+
`grep '^N: Name=' | `
+
`sed 's/.*"\\([^"]*\\)".*/\\1/' >
${
tmpFile
}
`
;
systemCtrl
.
executeSystemCommand
(
cmd
);
/* ---- 3. 读临时文件 ---- */
const
line
=
fs
.
read
(
tmpFile
,
'
r
'
);
if
(
!
line
)
return
'
NG
'
;
/* ---- 4. 返回原样字符串(已 trim) ---- */
return
line
.
trim
();
// 例如 "SITRONIX"
}
// 检查 License 是否注册(示例函数,需根据实际授权机制实现)
function
checkLicense
()
{
const
fs
=
require
(
"
@system.fs
"
)
...
...
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