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
19128819
Commit
19128819
authored
Oct 13, 2025
by
lyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:增加TP版本号读取兼容老屏幕读取方式
parent
b4ab2c66
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
4 deletions
+80
-4
factoryTestItem/factoryTestTvoc.evue
factoryTestItem/factoryTestTvoc.evue
+1
-1
factoryTest_plugin/factory_testSystemInfo.js
factoryTest_plugin/factory_testSystemInfo.js
+79
-3
No files found.
factoryTestItem/factoryTestTvoc.evue
View file @
19128819
...
...
@@ -140,7 +140,7 @@
touchedYesButton
:
function
(
node
,
topNode
,
x
,
y
)
{
// globalThis.factoryTest.tvoc = 1;
this
.
clearTimer
();
this
.
clearTimer
();
var
global
=
require
(
"
factory_dataStorage.js
"
);
global
.
setFactoryData
(
"
tvoc
"
,
1
);
var
yesJumpPage
=
require
(
"
factoryYesJumpPage.js
"
);
...
...
factoryTest_plugin/factory_testSystemInfo.js
View file @
19128819
...
...
@@ -64,7 +64,7 @@ function setTextColorByValue(that, fullKey, value) {
if
(
checkedCount
==
textValueKeys
.
length
)
{
that
.
factoryTestSystemCheck
=
(
ngCount
==
0
)
?
1
:
2
;
if
(
that
.
factoryTestSystemCheck
==
1
)
{
if
(
that
.
factoryTestSystemCheck
==
1
)
{
checkAutoFactory
();
}
// 重置计数器,方便下次调用
...
...
@@ -106,6 +106,7 @@ function updateSystemInfo() {
systemInfo
.
screenVendor
=
""
;
systemInfo
.
ddrFrequency
=
"
NG
"
;
systemInfo
.
sn
=
userData
.
aboutSNValue
||
"
NG
"
;
systemInfo
.
tpVersion
=
userData
.
tpFirmwareVersion
||
"
NG
"
;
// 示例值
}
else
{
systemInfo
.
cpuTemperature
=
getCPUTemperature
();
...
...
@@ -117,10 +118,11 @@ function updateSystemInfo() {
systemInfo
.
screenVendor
=
getScreenVendor
();
// 需根据实际实现
systemInfo
.
ddrFrequency
=
getDDRFrequency
();
systemInfo
.
sn
=
handleSNDataBinFile
.
readStrFromBinFile
()
||
"
NG
"
;
systemInfo
.
tpVersion
=
getTPVersion
()
||
"
NG
"
;
}
// systemInfo.sn = userData.aboutSNValue || "NG";
// systemInfo.sn = userData.aboutInnerSNValue || "NG";
systemInfo
.
tpVersion
=
userData
.
tpFirmwareVersion
;
// 示例值
systemInfo
.
wifiModel
=
"
AP62212
"
;
// 示例值
...
...
@@ -412,8 +414,82 @@ function getCPUFrequency() {
}
function
getTPVersion
()
{
var
versionVal
=
getTPVersionNew
();
console
.
log
(
"
getTPVersion 1:
"
+
versionVal
);
if
(
versionVal
==
"
NG
"
)
{
versionVal
=
getTPVersionOld
();
console
.
log
(
"
getTPVersion 2:
"
+
versionVal
);
}
return
versionVal
;
}
function
getTPVersionOld
()
{
// 执行系统命令,将设备信息保存到临时文件
var
checkVersionPath
=
"
../../../../..
"
+
"
/proc/gt1x_debug
"
;
console
.
log
(
"
checkVersionPath:
"
+
checkVersionPath
);
if
(
!
fs
.
exists
(
checkVersionPath
))
{
return
"
NG
"
;
}
console
.
log
(
"
getTPVersion 1
"
);
systemCtrl
.
executeSystemCommand
(
"
cat
"
+
checkVersionPath
+
"
> /tmp/gt1x_debug.txt
"
);
// 读取临时文件内容
const
debugStr
=
fs
.
read
(
"
/tmp/gt1x_debug.txt
"
,
"
r
"
);
if
(
debugStr
)
{
// 按行分割文件内容
const
debugLines
=
debugStr
.
split
(
'
\n
'
);
for
(
let
i
=
0
;
i
<
debugLines
.
length
;
i
++
)
{
const
line
=
debugLines
[
i
].
trim
();
// 检查是否包含有效数据
if
(
line
.
startsWith
(
"
0x
"
))
{
// 提取第一个值
const
firstValue
=
line
.
split
(
'
,
'
)[
0
].
trim
();
const
decimalValue
=
parseInt
(
firstValue
,
16
);
return
decimalValue
.
toString
();
}
}
}
return
"
NG
"
;
// 如果未找到有效数据,返回 "NG"
}
function
getTPVersionNew
()
{
// 执行系统命令,将设备信息保存到临时文件
var
checkVersionPath
=
"
../../../../..
"
+
"
/sys/devices/platform/soc@3000000/2502800.twi/i2c-2/2-0055/stinform
"
;
console
.
log
(
"
checkVersionPath:
"
+
checkVersionPath
);
if
(
!
fs
.
exists
(
checkVersionPath
))
{
return
"
NG
"
;
}
systemCtrl
.
executeSystemCommand
(
"
cat
"
+
checkVersionPath
+
"
> /tmp/tp_version1.txt
"
);
// 读取临时文件内容
const
infoStr
=
fs
.
read
(
"
/tmp/tp_version1.txt
"
,
"
r
"
);
if
(
infoStr
)
{
// 按行分割文件内容
const
infoLines
=
infoStr
.
split
(
'
\n
'
);
for
(
let
i
=
0
;
i
<
infoLines
.
length
;
i
++
)
{
const
line
=
infoLines
[
i
].
trim
();
// 检查是否包含 "FW Version" 信息
if
(
line
.
startsWith
(
"
FW Version
"
))
{
// 提取版本号
const
version
=
line
.
split
(
'
=
'
)[
1
].
trim
();
// 转换为10进制
const
decimalValue
=
parseInt
(
version
,
16
);
return
decimalValue
.
toString
();
}
}
}
return
"
NG
"
;
// 如果未找到版本信息,返回 "NG"
}
function
getScreenVendor
()
{
systemCtrl
.
executeSystemCommand
(
"
cat /sys/devices/platform/soc@3000000/2502800.twi/i2c-2/2-0014/id > /tmp/tp_id.txt
"
);
var
checkVersionPath
=
"
/sys/devices/platform/soc@3000000/2502800.twi/i2c-2/2-0014/id
"
;
if
(
!
fs
.
exists
(
checkVersionPath
))
{
return
"
NG
"
;
}
// cf1133
systemCtrl
.
executeSystemCommand
(
"
cat
"
+
checkVersionPath
+
"
> /tmp/tp_id.txt
"
);
const
vendorStr
=
fs
.
read
(
"
/tmp/tp_id.txt
"
,
"
r
"
);
if
(
vendorStr
)
{
...
...
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