Commit a1c90f31 authored by lyong's avatar lyong

优化老化测试视频播放

parent 6d70ad27
......@@ -2,7 +2,7 @@
<div class="screen" onpress="onChildLockPress" onrelease="onChildLockRelease">
<div style="left:0;top:0;width:480;height:30; background-color:rgb(0, 0, 0);" id="tipDiv">
<text class="fontsize22Left" style="left:1;top: 0;text-align: center ;width: 240;height:30;background-color:rgb(224, 76, 12);">长按退出</text>
<text class="fontsize22Left" style="left:1;top: 0;text-align: center ;width: 240;height:30;background-color:rgb(224, 76, 12);">长按重启</text>
<div style="left:240;top: 0;text-align: left;width: 240;height:30;background-color:#FFFFFF; opacity: 0.7;">
<div class="yLine" style="left:0;background-color:#000000;"></div>
<text class="fontsize22Left" style="left:3;top: 0;text-align: left;width: 80;color: #000000; ">{{crtMousemoveX}}</text>
......
......@@ -31,7 +31,7 @@ function system(str) {
}
function initFactoryTestBurnIn(obj) {
that = obj;
// startMp4();
startMp4();
if (id_testBurnInTimer != null) {
clearInterval(id_testBurnInTimer);
id_testBurnInTimer == null;
......@@ -51,7 +51,7 @@ function initFactoryTestBurnIn(obj) {
}
function quitFactoryTestBurnIn() {
// exitMp4();
exitMp4();
//console.log("quitFactoryTestBurnIn");
if (id_testBurnInTimer != null) {
clearInterval(id_testBurnInTimer);
......@@ -63,7 +63,6 @@ function quitFactoryTestBurnIn() {
function startMp4() {
// lvgl.lv_set_screen_transparent(true);
systemCtrl.executeSystemCommand("tplayerdemo /mnt/app/quicknode/tests/re860_factory/images/factory/testVideo240p.mp4 &");
// systemCtrl.executeSystemCommand("quit");
// router.push({
// path: "factoryTestBurnIn"
......@@ -71,9 +70,24 @@ function startMp4() {
}
function exitMp4() {
// systemCtrl.executeSystemCommand("quit");
systemCtrl.executeSystemCommand("killall -9 tplayerdemo &");
// systemCtrl.executeSystemCommand("dd if=/dev/zero of=/dev/fb0");
// system("dd if=/dev/zero of=/dev/fb0");
systemCtrl.executeSystemCommand("quit");
// systemCtrl.executeSystemCommand("killall -9 tplayerdemo");
// setTimeout(() => {
systemCtrl.executeSystemCommand("tplayerdemo");
// console.log("!!!!!!!!!quitMp4 1");
systemCtrl.executeSystemCommand("quit");
// console.log("!!!!!!!!!quitMp4 2");
systemCtrl.executeSystemCommand("killall -9 tplayerdemo &");
// console.log("!!!!!!!!!quitMp4 3");
// }, 1000);
// lvgl.lv_set_screen_transparent(false);
systemCtrl.executeSystemCommand("reboot 1");
systemCtrl.executeSystemCommand("quit");
}
function setTextColorById(that, id, value) {
const color = (value === "NA") ? "#ff0000" : "#00ff00";
......@@ -199,11 +213,17 @@ function getMemoryInfo() {
const memStr = fs.read("/tmp/meminfo.txt", "r");
if (memStr) {
const lines = memStr.split('\n');
if(!lines){
return "NG";
}
// 跳过表头
for (let i = 1; i < lines.length; i++) {
const line = lines[i].trim();
if (line.startsWith("Mem")) {
const parts = line.split(/\s+/);
if(!parts){
return "NG";
}
if (parts.length > 1) {
const memTotal = parts[1]; // 总量
const memUsed = parts[2]; // 使用量
......@@ -269,7 +289,7 @@ function delayExecute(func, delay) {
function getTestMask() {
const testMasks = Object.keys(testMaskMap);
const testMasks = Object.keys(testMaskMap);4
strMemtesterCnt = (strMemtesterCnt + 1) % testMasks.length;
return testMasks[strMemtesterCnt];
}
......@@ -309,6 +329,9 @@ function getAvailableMemory() {
const memStr = fs.read("/tmp/meminfo.txt", "r");
if (memStr) {
const lines = memStr.split('\n');
if(!lines){
return "NG";
}
for (let i = 1; i < lines.length; i++) {
const line = lines[i].trim();
if (line.startsWith("Mem")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment