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
675b8055
Commit
675b8055
authored
Oct 15, 2025
by
lyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:优化rtc测试第一轮不会停止时间流逝
parent
19128819
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
12 deletions
+29
-12
factoryTestItem/factoryTestRtc.evue
factoryTestItem/factoryTestRtc.evue
+7
-2
factoryTest_plugin/factory_testRtc.js
factoryTest_plugin/factory_testRtc.js
+22
-10
No files found.
factoryTestItem/factoryTestRtc.evue
View file @
675b8055
...
...
@@ -74,8 +74,11 @@
require
(
"
factory_testAuto.js
"
).
autoFactoryNextPage
(
"
factoryTestRtc
"
);
},
exit
:
function
()
{
factory_testRtc
.
exitTestRTC
();
},
touchedYesButton
:
function
(
node
,
topNode
,
x
,
y
)
{
this
.
exit
();
this
.
checkAutoFactory
();
var
global
=
require
(
"
factory_dataStorage.js
"
);
//if (globalThis.factoryTest.autoStart == 1)
...
...
@@ -88,6 +91,7 @@
yesJumpPage
.
yesGoToNextPage
(
"
factoryTestRtc
"
);
},
touchedNGButton
:
function
(
node
,
topNode
,
x
,
y
)
{
this
.
exit
();
//globalThis.factoryTest.rtc = 2;
var
global
=
require
(
"
factory_dataStorage.js
"
);
global
.
setFactoryData
(
"
rtc
"
,
2
);
...
...
@@ -96,7 +100,8 @@
});
},
touchedBackButton
:
function
(
node
,
topNode
,
x
,
y
)
{
// var global = require("factory_dataStorage.js");
this
.
exit
();
// var global = require("factory_dataStorage.js");
//global.setFactoryData("rtc", 3);
router
.
push
({
path
:
"
factory_testList
"
,
...
...
factoryTest_plugin/factory_testRtc.js
View file @
675b8055
...
...
@@ -33,6 +33,7 @@ function factoryTestRTCInit(obj) {
cntTime
=
0
;
cntSuccess
=
0
;
}
that
.
crtfilesLocalTime
=
"
NA
"
;
updateRtcInfo
();
id_testRtcTimer
=
setInterval
(()
=>
{
cntTime
+=
1
;
...
...
@@ -56,6 +57,9 @@ function setTextColorByText(that, id, value) {
}
that
.
$setTextColor
(
id
,
color
);
}
var
testCnt
=
3
function
updateRtcInfo
()
{
var
rtc
=
getRtcTime
();
...
...
@@ -72,7 +76,7 @@ function updateRtcInfo() {
console
.
log
(
"
allValuesValid:
"
+
allValuesValid
);
// 根据检查结果设置烧录测试状态
that
.
crtfilesLocalTime
=
"
NA
"
;
console
.
log
(
`[RTC] 第
${
cntTime
}
次检测,状态:
${
allValuesValid
==
true
?
"
有效
"
:
"
无效
"
}
`
);
...
...
@@ -105,7 +109,8 @@ function updateRtcInfo() {
console
.
log
(
"
[RTC] 时钟未前进,测试失败
"
);
cntSuccess
=
0
;
var
state
=
0
;
that
.
crtTextRtcText
=
state
?
"
测试通过
"
:
"
测试失败
"
;
var
text
=
state
?
"
测试通过
"
:
"
测试失败
"
;
that
.
crtTextRtcText
=
text
+
"
,如需RTC时间流逝测试,请重进
"
setTextColorByText
(
that
,
'
id_crtTextRtcText
'
,
that
.
crtTextRtcText
);
//globalThis.factoryTest.rtc = state ? 1 : 2;
var
testVal
=
state
?
1
:
2
;
...
...
@@ -117,17 +122,23 @@ function updateRtcInfo() {
console
.
log
(
"
[RTC] 时钟已前进,继续通过流程
"
);
system
(
"
rm -fr
"
+
Path
);
var
state
=
1
;
that
.
crtTextRtcText
=
state
?
"
测试通过
"
:
"
测试失败
"
;
var
text
=
state
?
"
测试通过
"
:
"
测试失败
"
;
that
.
crtTextRtcText
=
text
+
"
,如需RTC时间流逝测试,请重进
"
setTextColorByText
(
that
,
'
id_crtTextRtcText
'
,
that
.
crtTextRtcText
);
//globalThis.factoryTest.rtc = state ? 1 : 2;
var
testVal
=
state
?
1
:
2
;
that
.
$setY
(
"
id_yes
"
,
state
?
0
:
-
480
);
console
.
log
(
"
[RTC] 测试完成,最终状态:
"
+
(
state
?
"
通过
"
:
"
失败
"
));
var
global
=
require
(
"
factory_dataStorage.js
"
);
global
.
setFactoryData
(
"
rtc
"
,
1
);
}
var
global
=
require
(
"
factory_dataStorage.js
"
);
global
.
setFactoryData
(
"
rtc
"
,
testVal
);
// if (testVal == 2) {
exitTestRTC
();
//}
}
else
{
oneTest
();
}
...
...
@@ -139,7 +150,7 @@ function updateRtcInfo() {
oneTest
();
}
exitTestRTC
();
//
exitTestRTC();
}
// that.crtTextRtcText = cntSuccess > testCnt ? "测试通过" : "测试失败";
// setTextColorByText(that, 'id_crtTextRtcText', that.crtTextRtcText);
...
...
@@ -158,11 +169,14 @@ function updateRtcInfo() {
function
oneTest
()
{
var
iso
=
that
.
crtLocalTime
;
system
(
"
echo '
"
+
iso
+
"
' >
"
+
Path
);
that
.
crtfilesLocalTime
=
iso
;
system
(
"
echo '
"
+
iso
+
"
' >
"
+
tmpPath
);
system
(
"
sync
"
);
that
.
crtfilesLocalTime
=
iso
;
setTimeout
(()
=>
{
that
.
crtTextRtcText
=
"
请断电重启 测试第二阶段掉电保存
"
that
.
crtTextRtcText
=
"
请断电重启 测试第二阶段掉电保存
"
},
300
);
}
...
...
@@ -242,7 +256,5 @@ function getRtcTime() {
module
.
exports
=
{
factoryTestRTCInit
:
factoryTestRTCInit
,
exitTestRTC
:
exitTestRTC
exitTestRTC
:
exitTestRTC
,
}
\ No newline at end of file
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