Commit 8700e8c9 authored by waterword's avatar waterword

refactor: 注释掉多余的 console.log 语句

- 在多个文件中注释掉了大量的 console.log 语句,减少了日志输出
- 优化了代码结构,提高了代码可读性和性能
- 这些更改不影响功能,仅清理了调试代码
parent 0a490c8c
// globalThis.cslog = console.log
// console.log = function () {
// globalThis.cslog = //console.log
// //console.log = function () {
// }
// console.trace = function () {
......@@ -35,7 +35,7 @@ function onCreate(uri) {
}
var process = require("@system.process")
if (process.platform == "win32") {
console.log("its win32.")
//console.log("its win32.")
globalThis.Simu.En = 1
}
globalThis.DEV = {
......@@ -43,7 +43,7 @@ function onCreate(uri) {
}
initEventLister();
gc();
console.log(showMemInfo());
//console.log(showMemInfo());
var evue = require("router.js");
var router = evue.router;
......@@ -55,21 +55,21 @@ function onCreate(uri) {
if (startUrl() == undefined) {
times.push(clock());
gc();
console.log(showMemInfo());
//console.log(showMemInfo());
router.push({ 'path': uri });
times.push(clock());
console.log(times)
//console.log(times)
gc();
console.log(showMemInfo());
//console.log(showMemInfo());
} else {
times.push(clock());
var uriObj = JSON.parse(globalThat.$uri);
console.log(uriObj);
//console.log(uriObj);
router.push(uriObj);
times.push(clock());
console.log(times)
//console.log(times)
gc();
console.log(showMemInfo());
//console.log(showMemInfo());
}
}
......@@ -77,7 +77,7 @@ function onCreate(uri) {
// var router = require("@system.router");
// var keypad = require("keypadCode.js")
// keypad.triggerByCode(code)
// console.log("++++ CodeNum:" + code)
// //console.log("++++ CodeNum:" + code)
// return
// if (code == 62) {
// router.pageDebug(!router.debugOn);
......
No preview for this file type
......@@ -83,11 +83,11 @@
},
onHide: function () {
console.log(this.$uri + "===========onHide=============");
//console.log(this.$uri + "===========onHide=============");
this.clearTimer();
},
onQuit: function () {
console.log(this.$uri + "===========onQuit=============");
//console.log(this.$uri + "===========onQuit=============");
this.clearTimer();
},
clearTimer: function () {
......@@ -98,7 +98,7 @@
touchedYesButton: function (node, topNode, x, y) {
globalThis.factoryTest.bright = 1;
var yesJumpPage = require("factoryYesJumpPage.js");
console.log("=====yesJumpPage.yesGoToNextPage(factoryTestBright);")
//console.log("=====yesJumpPage.yesGoToNextPage(factoryTestBright);")
yesJumpPage.yesGoToNextPage("factoryTestBright");
},
touchedNGButton: function (node, topNode, x, y) {
......@@ -119,7 +119,7 @@
movePage: function (oldPage, newPage) {
console.log(oldPage + "==========to==========" + newPage);
//console.log(oldPage + "==========to==========" + newPage);
this.$hide(oldPage); // 跳转页面之前立即关掉toast
this.$setY(oldPage, -480); // hide
this.$show(newPage)
......@@ -127,13 +127,13 @@
},
onBrightnessValueChanged: function (node, value) {
console.log("value=" + value);
//console.log("value=" + value);
this.brightnessValue = value;
this.crtBrightnessValue = value;
var tempWidth = Math.round((value / 100) * 324);
this.$setWidth("id_setBrightnessLineShowDiv", tempWidth);
console.log("value=" + value);
console.log("send onBrightnessValueChanged signal!");
//console.log("value=" + value);
//console.log("send onBrightnessValueChanged signal!");
this.onBrightnessValueChangedEvent(this.brightnessValue);
......@@ -141,16 +141,16 @@
onBrightnessValueRelease: function (node, topnode, x, y) {
console.log("send onBrightnessValueRelease signal!");
//console.log("send onBrightnessValueRelease signal!");
},
onBrightnessValueChangedEvent: function (brightnessValue) {
console.log("receive onBrightnessValueChangedEvent singal!");
//console.log("receive onBrightnessValueChangedEvent singal!");
// todo: 控制屏幕亮度, brightnessValue:0~100
// userData.brightnessValue = brightnessValue;
var value = Math.round(brightnessValue * 255 / 100);
console.log("onBrightnessValueChangedEvent value=" + value);
//console.log("onBrightnessValueChangedEvent value=" + value);
bglight.ctrl(value);
}
};
......
......@@ -67,7 +67,7 @@
//this.$setImageForceUpdate(true);
},
onShow: function () {
console.log(this.$uri + "===========onShow=============")
//console.log(this.$uri + "===========onShow=============")
this.$hide("id_testPng")
this.$hide("id_yes")
this.$hide("id_ng")
......@@ -80,11 +80,11 @@
this.imgCnt++
},
onHide: function () {
console.log(this.$uri + "===========onHide=============")
//console.log(this.$uri + "===========onHide=============")
this.clearTimer()
},
onQuit: function () {
console.log(this.$uri + "===========onQuit=============")
//console.log(this.$uri + "===========onQuit=============")
this.clearTimer()
},
......@@ -104,7 +104,7 @@
shortDelay: function () {
this.$setX("id_ng", 800);
this.$setY("id_ng", 340);
console.log("=====show id_ng successful!")
//console.log("=====show id_ng successful!")
this.$clearTimeout(this.shortDelayId);
},
......@@ -118,7 +118,7 @@
this.checkFlagBash2(this.pngCnt)
this.pngCnt++
if (this.pngCnt == this.colorBashPng.length) {
console.log("=====show id_yes successful!")
//console.log("=====show id_yes successful!")
this.$show("id_yes")
this.$show("id_ng")
this.$show("id_back")
......@@ -134,7 +134,7 @@
// path: "factory_testList"
// }
var yesJumpPage = require("factoryYesJumpPage.js");
console.log("=====yesJumpPage.yesGoToNextPage(factoryTestColor);")
//console.log("=====yesJumpPage.yesGoToNextPage(factoryTestColor);")
yesJumpPage.yesGoToNextPage("factoryTestColor");
//);
......@@ -155,18 +155,18 @@
},
/*************** gesture ***************/
onGestureEvent: function (dir, x, y) {
console.log(dir + " " + x + " " + y);
//console.log(dir + " " + x + " " + y);
},
/*************** work ***************/
checkFlagBash: function (val) {
var temp = this.colorBash[val].val
console.log("tempType = " + typeof temp)
console.log("tempValue = " + temp)
//console.log("tempType = " + typeof temp)
//console.log("tempValue = " + temp)
this.$setBackgroundColor("id_color", temp)
},
checkFlagBash2: function (val) {
var temp = this.colorBashPng[val].val
console.log("tempValue = " + temp)
//console.log("tempValue = " + temp)
this.gifIconSrc = temp;
this.$show("id_testPng")
},
......
......@@ -74,11 +74,11 @@
},
onHide: function () {
console.log(this.$uri + "===========onHide=============");
//console.log(this.$uri + "===========onHide=============");
this.clearTimer();
},
onQuit: function () {
console.log(this.$uri + "===========onQuit=============");
//console.log(this.$uri + "===========onQuit=============");
this.clearTimer();
},
clearTimer: function () {
......@@ -89,7 +89,7 @@
touchedYesButton: function (node, topNode, x, y) {
globalThis.factoryTest.licenseAuthor = 1;
var yesJumpPage = require("factoryYesJumpPage.js");
console.log("=====yesJumpPage.yesGoToNextPage(factoryTestLicenseAuthor);")
//console.log("=====yesJumpPage.yesGoToNextPage(factoryTestLicenseAuthor);")
yesJumpPage.yesGoToNextPage("factoryTestLicenseAuthor");
},
touchedNGButton: function (node, topNode, x, y) {
......@@ -110,12 +110,12 @@
var partFilePath = "../../../../../mnt/extsd/msdkFiles/" + filenm
if (fs.exists(partFilePath)) {
this.crtBrightnessValue = "已注册!"
console.log("the " + filenm + " is exists.")
//console.log("the " + filenm + " is exists.")
this.$setY("id_yes", 0);
return 0
}
// console.log("the " + filenm + " is exists.")
// //console.log("the " + filenm + " is exists.")
this.crtBrightnessValue = "未注册"
......@@ -123,7 +123,7 @@
},
movePage: function (oldPage, newPage) {
console.log(oldPage + "==========to==========" + newPage);
//console.log(oldPage + "==========to==========" + newPage);
this.$hide(oldPage); // 跳转页面之前立即关掉toast
this.$setY(oldPage, -480); // hide
this.$show(newPage)
......
......@@ -67,11 +67,11 @@
},
onHide: function () {
console.log(this.$uri + "===========onHide=============");
//console.log(this.$uri + "===========onHide=============");
this.clearTimer();
},
onQuit: function () {
console.log(this.$uri + "===========onQuit=============");
//console.log(this.$uri + "===========onQuit=============");
this.clearTimer();
},
clearTimer: function () {
......@@ -82,7 +82,7 @@
touchedYesButton: function (node, topNode, x, y) {
globalThis.factoryTest.sound = 1;
var yesJumpPage = require("factoryYesJumpPage.js");
console.log("=====yesJumpPage.yesGoToNextPage(factoryTestSound);")
//console.log("=====yesJumpPage.yesGoToNextPage(factoryTestSound);")
yesJumpPage.yesGoToNextPage("factoryTestSound");
},
touchedNGButton: function (node, topNode, x, y) {
......@@ -109,7 +109,7 @@
},
movePage: function (oldPage, newPage) {
console.log(oldPage + "==========to==========" + newPage);
//console.log(oldPage + "==========to==========" + newPage);
this.$hide(oldPage); // 跳转页面之前立即关掉toast
this.$setY(oldPage, -480); // hide
this.$show(newPage)
......
......@@ -121,7 +121,7 @@
for (x = 0; x < 15; x++) {
for (y = 0; y < 15; y++) {
var relId = "id_block" + x + "_" + y;
console.log("relId :" + relId);
////console.log("relId :" + relId);
this.$setBackgroundColor(relId, 0xFFFFFF)
}
}
......@@ -142,7 +142,7 @@
// var dom = require("dom.js"); app.js引入
pointInit: function () {
var getPointTopDiv = document.getElementById('id_pointDiv');
console.log("getPointTopDiv:" + getPointTopDiv);
////console.log("getPointTopDiv:" + getPointTopDiv);
if (!getPointTopDiv)
return
......@@ -201,8 +201,8 @@
},
onShow: function () {
console.log(this.$uri + "===========factoryTestTouch onShow=============");
console.log("FirstStartupFlag:" + FirstStartupFlag);
////console.log(this.$uri + "===========factoryTestTouch onShow=============");
////console.log("FirstStartupFlag:" + FirstStartupFlag);
if (FirstStartupFlag == 1) {
this.timerSet();
this.pointInit();
......@@ -233,12 +233,12 @@
this.resetDrawDiv();
},
onHide: function () {
console.log(this.$uri + "===========factoryTestTouch onHide=============");
////console.log(this.$uri + "===========factoryTestTouch onHide=============");
this.clearTimer();
this.exitEvent();
},
onQuit: function () {
console.log(this.$uri + "===========factoryTestTouch onQuit=============");
////console.log(this.$uri + "===========factoryTestTouch onQuit=============");
this.clearTimer();
this.exitEvent();
},
......@@ -253,7 +253,7 @@
initDiv: function (x, y) {
var relId = "id_block" + x + "_" + y;
console.log("relId :" + relId);
////console.log("relId :" + relId);
this.$setPos(relId, x * 32, y * 32);
// if (this.flagBashStd[x][y] == 1) {
// this.$setBackgroundColor(relId, 0x000000);
......@@ -261,7 +261,7 @@
},
chanelDiv: function (x, y) {
var relId = "id_block" + x + "_" + y;
console.log("relId :" + relId);
////console.log("relId :" + relId);
this.$setPos(relId, -480, -480);
this.$setBackgroundColor(relId, 0x000000)
this.flagBashStd[x][y] = 1;
......@@ -275,7 +275,7 @@
var divwidth = 32;
var xmax = 480 / divwidth;
var ymax = 480 / divheight;
console.log("xmax :" + xmax + "ymax :" + ymax);
////console.log("xmax :" + xmax + "ymax :" + ymax);
......@@ -290,7 +290,7 @@
this.chanelDiv(x, y)
}
// var relId = "id_block" + x +"_"+ y;
// console.log("relId :" + relId);
// ////console.log("relId :" + relId);
// this.$setPos(relId, x * 32, y * 32);
// if (this.flagBashStd[x][y] == 1) {
// this.$setBackgroundColor(relId, 0x000000);
......@@ -305,7 +305,7 @@
/*************** gesture ***************/
onGestureEvent: function (dir, x, y) {
console.log(dir + " " + x + " " + y);
////console.log(dir + " " + x + " " + y);
},
figCoor: function (x, y) {
var divwidth = 32;
......@@ -316,47 +316,47 @@
// 确保 gridX 和 gridY 在 0-14 的范围内
gridX = Math.max(0, Math.min(gridX, 14));
gridY = Math.max(0, Math.min(gridY, 14));
console.log("gridX: " + gridX + " gridY: " + gridY);
////console.log("gridX: " + gridX + " gridY: " + gridY);
this.flagBash[gridX][gridY] = 1;
if (this.flagBashStd[gridX][gridY] == 1) {
return undefined;
}
var coor = gridX + "_" + gridY;
console.log(coor);
////console.log(coor);
return coor;
},
// refDivColor: function (coor) {
// var relId = "id_block" + coor
// console.log("relId :" + relId);
// ////console.log("relId :" + relId);
// this.$setBackgroundColor(relId, 0x00ff00);
// // this.$setPos(relId, gridX * 32, gridY * 32); // 确保位置正确
// },
refChannleDivColor: function (coor) {
var relId = "id_block" + coor;
console.log("refDivColor - relId: " + relId);
////console.log("refDivColor - relId: " + relId);
if (document.getElementById(relId)) {
console.log("Element found: " + relId);
////console.log("Element found: " + relId);
this.$setBackgroundColor(relId, 0xFFFFFF);
} else {
console.log("Element not found: " + relId);
////console.log("Element not found: " + relId);
}
},
refDivColor: function (coor) {
var relId = "id_block" + coor;
console.log("refDivColor - relId: " + relId);
////console.log("refDivColor - relId: " + relId);
if (document.getElementById(relId)) {
console.log("Element found: " + relId);
////console.log("Element found: " + relId);
this.$setBackgroundColor(relId, 0x00ff00);
} else {
console.log("Element not found: " + relId);
////console.log("Element not found: " + relId);
}
},
onmousemove: function (gx, gy, topNode, x, y) {
console.log("onmousemove--->gx:" + gx + " gy:" + gy);
////console.log("onmousemove--->gx:" + gx + " gy:" + gy);
if (gx > 480 || gy > 480)
return;
......@@ -375,7 +375,7 @@
// // }
// },
touchedScreen: function (node, topNode, x, y) {
console.log("X:" + x + " Y:" + y);
////console.log("X:" + x + " Y:" + y);
this.$enableMouseMoveEvent(true);
},
releasedScreen: function (node, topNode, x, y) {
......@@ -407,7 +407,7 @@
touchedYesButton: function (node, topNode, x, y) {
globalThis.factoryTest.touch = 1;
var yesJumpPage = require("factoryYesJumpPage.js");
console.log("=====yesJumpPage.yesGoToNextPage(factoryTestTouch);")
////console.log("=====yesJumpPage.yesGoToNextPage(factoryTestTouch);")
yesJumpPage.yesGoToNextPage("factoryTestTouch");
},
touchedNGButton: function (node, topNode, x, y) {
......
......@@ -29,7 +29,7 @@
for (x = 0; x < 15; x++) {
for (y = 0; y < 15; y++) {
var relId = "id_block" + x + "_" + y;
console.log("relId :" + relId);
//console.log("relId :" + relId);
this.$setBackgroundColor(relId, 0xFFFFFF)
}
}
......@@ -39,7 +39,7 @@
// var dom = require("dom.js"); app.js引入
pointInit: function () {
var getPointTopDiv = document.getElementById('id_pointDiv');
console.log("getPointTopDiv:" + getPointTopDiv);
//console.log("getPointTopDiv:" + getPointTopDiv);
if (!getPointTopDiv)
return
......@@ -105,8 +105,8 @@
},
onShow: function () {
console.log(this.$uri + "===========factoryTestTouch onShow=============");
console.log("FirstStartupFlag:" + FirstStartupFlag);
//console.log(this.$uri + "===========factoryTestTouch onShow=============");
//console.log("FirstStartupFlag:" + FirstStartupFlag);
if (FirstStartupFlag == 1) {
// this.timerSet();
this.pointInit();
......@@ -116,12 +116,12 @@
},
onHide: function () {
console.log(this.$uri + "===========factoryTestTouch onHide=============");
//console.log(this.$uri + "===========factoryTestTouch onHide=============");
this.clearTimer();
},
onQuit: function () {
console.log(this.$uri + "===========factoryTestTouch onQuit=============");
//console.log(this.$uri + "===========factoryTestTouch onQuit=============");
this.clearTimer();
},
......@@ -134,7 +134,7 @@
initDiv: function (x, y) {
var relId = "id_block" + x + "_" + y;
console.log("relId :" + relId);
//console.log("relId :" + relId);
this.$setPos(relId, x * 32, y * 32);
// if (this.flagBashStd[x][y] == 1) {
// this.$setBackgroundColor(relId, 0x000000);
......@@ -142,7 +142,7 @@
},
chanelDiv: function (x, y) {
var relId = "id_block" + x + "_" + y;
console.log("relId :" + relId);
//console.log("relId :" + relId);
this.$setPos(relId, -480, -480);
this.$setBackgroundColor(relId, 0x000000)
this.flagBashStd[x][y] = 1;
......@@ -154,40 +154,40 @@
/*************** gesture ***************/
onGestureEvent: function (dir, x, y) {
console.log(dir + " " + x + " " + y);
//console.log(dir + " " + x + " " + y);
},
// refDivColor: function (coor) {
// var relId = "id_block" + coor
// console.log("relId :" + relId);
// //console.log("relId :" + relId);
// this.$setBackgroundColor(relId, 0x00ff00);
// // this.$setPos(relId, gridX * 32, gridY * 32); // 确保位置正确
// },
refChannleDivColor: function (coor) {
var relId = "id_block" + coor;
console.log("refDivColor - relId: " + relId);
//console.log("refDivColor - relId: " + relId);
if (document.getElementById(relId)) {
console.log("Element found: " + relId);
//console.log("Element found: " + relId);
this.$setBackgroundColor(relId, 0xFFFFFF);
} else {
console.log("Element not found: " + relId);
//console.log("Element not found: " + relId);
}
},
refDivColor: function (coor) {
var relId = "id_block" + coor;
console.log("refDivColor - relId: " + relId);
//console.log("refDivColor - relId: " + relId);
if (document.getElementById(relId)) {
console.log("Element found: " + relId);
//console.log("Element found: " + relId);
this.$setBackgroundColor(relId, 0x00ff00);
} else {
console.log("Element not found: " + relId);
//console.log("Element not found: " + relId);
}
},
onmousemove: function (gx, gy, topNode, x, y) {
console.log("onmousemove--->gx:" + gx + " gy:" + gy);
//console.log("onmousemove--->gx:" + gx + " gy:" + gy);
if (gx > 480 || gy > 480)
return;
......@@ -198,7 +198,7 @@
},
touchedScreen: function (node, topNode, x, y) {
console.log("X:" + x + " Y:" + y);
//console.log("X:" + x + " Y:" + y);
// this.$enableMouseMoveEvent(true);
},
releasedScreen: function (node, topNode, x, y) {
......
......@@ -66,7 +66,7 @@
onInit() {
},
InterValTime: function () {
console.log("sendValue:" + sendValue);
//console.log("sendValue:" + sendValue);
sendValue += 1;
packet_cmd.pack_cmd_packet_0x50();
this.sendCommValueText = "" + sendValue;
......@@ -89,7 +89,7 @@
var process = require("@system.process")
if (process.platform != "win32") {
serialManager.open(serialPortName, function (isSuccess, status) {
console.log("=========open_async [".concat(isSuccess, "] [").concat(status, "]========="));
//console.log("=========open_async [".concat(isSuccess, "] [").concat(status, "]========="));
});
}
},
......@@ -100,11 +100,11 @@
},
onHide: function () {
console.log(this.$uri + "===========onHide=============");
//console.log(this.$uri + "===========onHide=============");
this.clearTimer();
},
onQuit: function () {
console.log(this.$uri + "===========onQuit=============");
//console.log(this.$uri + "===========onQuit=============");
this.clearTimer();
},
clearTimer: function () {
......@@ -117,7 +117,7 @@
userData.factoryRecvCnt = 0;
var yesJumpPage = require("factoryYesJumpPage.js");
console.log("=====yesJumpPage.yesGoToNextPage(factoryTestUartComm);")
//console.log("=====yesJumpPage.yesGoToNextPage(factoryTestUartComm);")
yesJumpPage.yesGoToNextPage("factoryTestUartComm");
},
touchedNGButton: function (node, topNode, x, y) {
......@@ -134,7 +134,7 @@
movePage: function (oldPage, newPage) {
console.log(oldPage + "==========to==========" + newPage);
//console.log(oldPage + "==========to==========" + newPage);
this.$hide(oldPage); // 跳转页面之前立即关掉toast
this.$setY(oldPage, -480); // hide
this.$show(newPage)
......
......@@ -1143,7 +1143,7 @@
InterValTime: function () {
console.log("=========================InterValTime====================");
//console.log("=========================InterValTime====================");
wifiEventJS.connect_wifi(this.initWifissid, this.initWifipwd,this.initencryptedMode);
......@@ -1160,19 +1160,19 @@
// this.wifiInfoState_TEXT = connectStatus ? "WIFI测试成功" : "WIFI测试失败"
this.$setTextColor("wifiInfoState_TEXT", connectStatus ? "#ff0000" : "#000000");
console.log("SSID: " + wifiInfo.ssid);
console.log("Signal Level: " + wifiInfo.signalLevel + " dBm");
console.log("Is Encrypted: " + (wifiInfo.isEncrypted ? "Yes" : "No"));
console.log("Is Connected: " + (wifiInfo.isConnected ? "WIFI测试成功" : "WIFI测试失败"));
//console.log("SSID: " + wifiInfo.ssid);
//console.log("Signal Level: " + wifiInfo.signalLevel + " dBm");
//console.log("Is Encrypted: " + (wifiInfo.isEncrypted ? "Yes" : "No"));
//console.log("Is Connected: " + (wifiInfo.isConnected ? "WIFI测试成功" : "WIFI测试失败"));
if (wifiInfo.isConnected) {
if (wifiInfo.signalLevel > -38) {
console.log("okok");
//console.log("okok");
this.$setY("id_yes", 0);
this.wifiInfoState_TEXT ="WIFI测试成功"
return;
} else {
console.log("no");
//console.log("no");
this.$setY("id_yes", -480);
// this.wifiInfoState_TEXT = connectStatus + "但是信号强度需要大于-38dB"
......@@ -1184,7 +1184,7 @@
this.$setY("id_yes", -480);
}
} else {
console.log("No WiFi information available.");
//console.log("No WiFi information available.");
}
this.wifiInfoState_TEXT ="WIFI测试失败"
......@@ -1251,20 +1251,20 @@
// this.proxy = new InstallationGeneralSettingProxy(this);
// this.mounted = true;
//}
//console.log("this.proxy=" + this.proxy);
////console.log("this.proxy=" + this.proxy);
//console.log("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'''''''''''''''''''''''''''''''''''''''''''''''''");
////console.log("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'''''''''''''''''''''''''''''''''''''''''''''''''");
//this.proxy.emit("onInstallationEnableWLANSwitch");
// document.setAttribute('id_dateTimeBasicPageList', 'list-set-edge-flash', false)
},
onHide: function () {
console.log(this.$uri + "===========onHide=============");
//console.log(this.$uri + "===========onHide=============");
this.clearTimer();
},
onQuit: function () {
console.log(this.$uri + "===========onQuit=============");
//console.log(this.$uri + "===========onQuit=============");
this.clearTimer();
},
clearTimer: function () {
......@@ -1276,7 +1276,7 @@
touchedYesButton: function (node, topNode, x, y) {
globalThis.factoryTest.wifi = 1;
var yesJumpPage = require("factoryYesJumpPage.js");
console.log("=====yesJumpPage.yesGoToNextPage(factoryTestWifi);")
//console.log("=====yesJumpPage.yesGoToNextPage(factoryTestWifi);")
yesJumpPage.yesGoToNextPage("factoryTestWifi");
},
touchedNGButton: function (node, topNode, x, y) {
......@@ -1291,7 +1291,7 @@
});
},
touchedscanWifiList: function (node, topNode, x, y) {
console.log("================touchedscanWifiList===============");
//console.log("================touchedscanWifiList===============");
wifiEventJS.enableWLANSwitch();
factoryDivPageJump.movePage("id_enableWLANChooseOnDiv");
},
......@@ -1303,14 +1303,14 @@
// wifiEventJS.enableWLANSwitch();
//},
hideShowConnectbutton: function (option) {
console.log("hideShowConnectbutton option=" + option);
//console.log("hideShowConnectbutton option=" + option);
switch (option) {
case 0:
console.log("id_startscanWifiHide --> 0");
//console.log("id_startscanWifiHide --> 0");
this.$setY("id_startscanWifiHide", 0)
break;
case 1:
console.log("id_startscanWifiHide -->1");
//console.log("id_startscanWifiHide -->1");
this.$setY("id_startscanWifiHide", -480)
break;
default:
......@@ -1319,8 +1319,8 @@
},
touchedStartScanWifiButton: function (node, topNode, x, y) {
console.log("touchedStartScanWifiButton");
console.log("====================================================");
//console.log("touchedStartScanWifiButton");
//console.log("====================================================");
this.hideShowConnectbutton(0);
wifiEventJS.connect_wifi(this.initWifissid, this.initWifipwd,this.initencryptedMode);
setTimeout(() => {
......@@ -1331,14 +1331,14 @@
hideShowConnectListbutton: function (option) {
console.log("hideShowConnectbutton option=" + option);
//console.log("hideShowConnectbutton option=" + option);
switch (option) {
case 0:
console.log("id_startscanWifi_List_hide --> 0");
//console.log("id_startscanWifi_List_hide --> 0");
this.$setY("id_startscanWifi_List_hide", 0)
break;
case 1:
console.log("id_startscanWifi_List_hide -->1");
//console.log("id_startscanWifi_List_hide -->1");
this.$setY("id_startscanWifi_List_hide", -480)
break;
default:
......@@ -1347,7 +1347,7 @@
},
touchedStartScanWifiDetailsButton: function (node, topNode, x, y) {
console.log("========touchedStartScanWifiDetailsButton=======");
//console.log("========touchedStartScanWifiDetailsButton=======");
this.hideShowConnectListbutton(0)
wifiEventJS.enableWLANSwitch();
setTimeout(() => {
......@@ -1356,11 +1356,11 @@
},
touchedDetailsBackButton: function (node, topNode, x, y) {
console.log("========touchedDetailsBackButton=======");
//console.log("========touchedDetailsBackButton=======");
factoryDivPageJump.movePage("wifiHmoe");
},
touchedStartScanWifiDetailsInputPasswordButton: function (node, topNode, x, y) {
console.log("========touchedStartScanWifiDetailsInputPasswordButton=======");
//console.log("========touchedStartScanWifiDetailsInputPasswordButton=======");
//wifiEventJS.enableWLANSwitch();
factoryDivPageJump.movePage("wifiHmoe");
var factory_testWifi = require("factory_testWifi.js");
......@@ -1369,7 +1369,7 @@
},
touchedDetailsBackInputPasswordButton: function (node, topNode, x, y) {
console.log("========touchedDetailsBackInputPasswordButton=======");
//console.log("========touchedDetailsBackInputPasswordButton=======");
factoryDivPageJump.movePage("id_enableWLANChooseOnDiv");
},
......@@ -1474,7 +1474,7 @@
break;
}
default: {
console.log("id is not defined!");
//console.log("id is not defined!");
break;
}
}
......@@ -1609,20 +1609,20 @@
},
chooseLanguagePickSelVal: function (node, value) {
console.log("choosed language=" + value);
//console.log("choosed language=" + value);
this.chooseLanguagePickSel = value;
// userData.languageChooseFlag = value;
},
chooseCountryPickSelVal: function (node, value) {
console.log("choosed country=" + value);
//console.log("choosed country=" + value);
this.chooseCountryPickSel = value;
// userData.countryChooseValue = value;
},
chooseTimeZonePickSelVal: function (node, value) {
console.log("choosed timeZone=" + value);
//console.log("choosed timeZone=" + value);
this.chooseTimeZonePickSel = value;
// userData.timeZoneChooseValue = value;
},
......@@ -1633,7 +1633,7 @@
var yearNum = userData.setTime.setYear;
var monthNum = userData.setTime.setMonth;
var maxDayNum = this.checkMonthToMaxDay(yearNum, monthNum);
console.log("maxDayNum=" + maxDayNum);
//console.log("maxDayNum=" + maxDayNum);
switch (maxDayNum) {
case 28: {
this.setTimePickerDayOpt = this.setTimePickerDayOptMax28;
......@@ -1660,7 +1660,7 @@
break;
}
default: {
console.log("This month day is error!");
//console.log("This month day is error!");
break;
}
}
......@@ -1671,10 +1671,10 @@
var maxDay = 0;
if (yeatValue % 4 == 0 && yeatValue % 100 != 0 || yeatValue % 400 == 0) {
leapOrCommonFlag = 1;
console.log("This year is a leap year!")
//console.log("This year is a leap year!")
} else {
leapOrCommonFlag = 0;
console.log("This year is a common year!")
//console.log("This year is a common year!")
}
switch (monthValue) {
case 1: { }
......@@ -1703,7 +1703,7 @@
break;
}
default:
console.log("This year num is error!");
//console.log("This year num is error!");
break;
}
return maxDay;
......@@ -1748,9 +1748,9 @@
} else {
this.setTimePickerDaySel = dayNum - 1;
}
console.log("this.setTimePickerYearSel=" + this.setTimePickerYearSel);
console.log("this.setTimePickerMonthSel=" + this.setTimePickerMonthSel);
console.log("this.setTimePickerDaySel=" + this.setTimePickerDaySel);
//console.log("this.setTimePickerYearSel=" + this.setTimePickerYearSel);
//console.log("this.setTimePickerMonthSel=" + this.setTimePickerMonthSel);
//console.log("this.setTimePickerDaySel=" + this.setTimePickerDaySel);
},
loadToSet12HTimeValuePage: function () {
......@@ -1799,33 +1799,33 @@
this.setTimePickerYearSel = value;
userData.setTime.setYear = this.setTimePickerYearSel + 2020;
this.setDayOpt();
console.log("this.setTimePickerYearSel=" + this.setTimePickerYearSel);
console.log("year val=" + userData.setTime.setYear);
//console.log("this.setTimePickerYearSel=" + this.setTimePickerYearSel);
//console.log("year val=" + userData.setTime.setYear);
},
setTimePickerMonthVal: function (node, value) {
this.setTimePickerMonthSel = value;
userData.setTime.setMonth = this.setTimePickerMonthSel + 1;
this.setDayOpt();
console.log("this.setTimePickerMonthSel=" + this.setTimePickerMonthSel);
console.log("month val=" + userData.setTime.setMonth);
//console.log("this.setTimePickerMonthSel=" + this.setTimePickerMonthSel);
//console.log("month val=" + userData.setTime.setMonth);
},
setTimePickerDayVal: function (node, value) {
var fixValue = 0;
if (value >= this.setTimePickerDayOpt.length) {
console.log("This is a error value=" + value);
console.log("in setTimePickerDayVal functions value is error!");
//console.log("This is a error value=" + value);
//console.log("in setTimePickerDayVal functions value is error!");
fixValue = this.setTimePickerDayOpt.length - 1;
this.setTimePickerDaySel = fixValue - 1;
console.log("After fix ,this value=" + fixValue);
//console.log("After fix ,this value=" + fixValue);
this.setTimePickerDaySel = fixValue;
} else {
this.setTimePickerDaySel = value;
}
userData.setTime.setDay = this.setTimePickerDaySel + 1;
console.log("this.setTimePickerDaySel=" + this.setTimePickerDaySel);
console.log("day val=" + userData.setTime.setDay);
//console.log("this.setTimePickerDaySel=" + this.setTimePickerDaySel);
//console.log("day val=" + userData.setTime.setDay);
},
setTimePicker24HourVal: function (node, value) {
......@@ -1836,8 +1836,8 @@
} else {
userData.AMPMFlag = 1;
}
console.log("this.setTimePicker24HourSel=" + this.setTimePicker24HourSel);
console.log("hour val=" + userData.setTime.setHour);
//console.log("this.setTimePicker24HourSel=" + this.setTimePicker24HourSel);
//console.log("hour val=" + userData.setTime.setHour);
},
setTimePicker12HourVal: function (node, value) {
......@@ -1855,23 +1855,23 @@
}
}
userData.setTime.setHour = hourValue;
console.log("this.setTimePicker12HourSel=" + this.setTimePicker12HourSel);
console.log("hour val=" + userData.setTime.setHour);
//console.log("this.setTimePicker12HourSel=" + this.setTimePicker12HourSel);
//console.log("hour val=" + userData.setTime.setHour);
},
setTimePickerMinuteVal: function (node, value) {
this.setTimePickerMinuteSel = value;
userData.setTime.setMinute = this.setTimePickerMinuteSel;
console.log("this.setTimePickerMinuteSel=" + this.setTimePickerMinuteSel);
console.log("minute val=" + userData.setTime.setMinute);
//console.log("this.setTimePickerMinuteSel=" + this.setTimePickerMinuteSel);
//console.log("minute val=" + userData.setTime.setMinute);
},
setTimePickerAMPMVal: function (node, value) {
this.setTimePickerAMPMSel = value;
userData.AMPMFlag = this.setTimePickerAMPMSel;
console.log("this.setTimePickerAMPMSel=" + this.setTimePickerAMPMSel);
console.log("AMPM val=" + userData.AMPMFlag);
console.log("userData.setTime.setHour=" + userData.setTime.setHour);
//console.log("this.setTimePickerAMPMSel=" + this.setTimePickerAMPMSel);
//console.log("AMPM val=" + userData.AMPMFlag);
//console.log("userData.setTime.setHour=" + userData.setTime.setHour);
},
leftAreaButtonClick: function (node, topnode, x, y) {
......@@ -1886,7 +1886,7 @@
var special = node.attributes.special;
if (special) {
// console.log("special=" + special);
// //console.log("special=" + special);
if (special == "backspace") {
if (this.output.length >= 1) {
this.output = this.output.slice(0, -1);
......@@ -1917,8 +1917,8 @@
if (this.output.length > 18) { //设置一个最大的范围,最多输入多少位? 暂时设置最多18位
return;
}
console.log("special=" + special);
console.log("this.letterOrSOrBSymbolFlag=" + this.letterOrSOrBSymbolFlag);
//console.log("special=" + special);
//console.log("this.letterOrSOrBSymbolFlag=" + this.letterOrSOrBSymbolFlag);
if (ch) {
this.output += this.keyBoardValueArray[this.letterOrSOrBSymbolFlag][ch];
this.invisiableOutput += "`";
......@@ -1932,7 +1932,7 @@
this.invisiableOutput += "`";
}
if (special == "enter" && this.output.length >= 8) {
console.log("send onInstallationGeneralSettingConnectWifi signal!");
//console.log("send onInstallationGeneralSettingConnectWifi signal!");
factoryDivPageJump.movePage("wifiHmoe");
var factory_testWifi = require("factory_testWifi.js");
......@@ -1943,7 +1943,7 @@
}
}
console.log("this.output=" + this.output);
//console.log("this.output=" + this.output);
if (this.input_id == "username") {
document.setAttribute("username", "text", this.output)
this.username = this.output;
......@@ -1973,8 +1973,8 @@
// this.setOpacity(node, 0.5)
var ch = node.attributes.value;
var special = node.attributes.special;
console.log("ch=" + ch);
console.log("special=" + special);
//console.log("ch=" + ch);
//console.log("special=" + special);
if (this.output.length < 8 && special == "enter") {
//this.$setY("id_hide", 0)
......@@ -2002,7 +2002,7 @@
this.$setY("id_normalKeyboardPng", setPngY);
var normalPngName = "./images/settings/keyboardSlices/" + this.concatenationFieldName[this
.letterOrSOrBSymbolFlag] + "LineFeedback" + ch + ".png";
console.log("normalPngName=" + normalPngName);
//console.log("normalPngName=" + normalPngName);
this.normalKeyboardPngSrc = normalPngName;
}
......@@ -2073,19 +2073,19 @@
windowWlanButtonBoxClick: function (node, topNode, x, y) {
console.log("send onWindowWlanButtonBoxClick signal!");
//console.log("send onWindowWlanButtonBoxClick signal!");
// //this.proxy.emit("onInstallationWindowWlanButtonBoxClick");
//this.evenSimu("onWindowButtonBoxClick")
},
windowWlanButtonCancelBoxClick: function (node, topNode, x, y) {
console.log("send onInstallationWindowWlanButtonCancelBoxClick signal!");
//console.log("send onInstallationWindowWlanButtonCancelBoxClick signal!");
// //this.proxy.emit("onInstallationWindowWlanButtonCancelBoxClick");
// this.evenSimu("onWindowWlanButtonCancelBoxClick")
},
enableCancelAtiveWLANClick: function (node, topNode, x, y) {
console.log("send onEnableCancelAtiveWLANClick signal!");
//console.log("send onEnableCancelAtiveWLANClick signal!");
////this.proxy.emit("onEnableCancelAtiveWLANClick");
// this.evenSimu("onEnableWLANSwitchClick")
......@@ -2105,7 +2105,7 @@
gotoCountrySetPageClick: function (node, topNode, x, y) {
//this.proxy.emit("onInstallationGeneralSettingGotoCountrySetPageClick");
//this.evenSimu("onGeneralSettingGotoCountrySetPageClick")
console.log("send onInstallationGeneralSettingGotoCountrySetPageClick signal!");
//console.log("send onInstallationGeneralSettingGotoCountrySetPageClick signal!");
},
chooseCountryBackClick: function (node, topNode, x, y) {
......@@ -2114,20 +2114,20 @@
}
//this.proxy.emit("onChooseCountryBackClick");
// this.evenSimu("onCountrySetConfirmButtonClick")
console.log("send onChooseCountryBackClick signal!");
//console.log("send onChooseCountryBackClick signal!");
},
countrySetConfirmButtonClick: function (node, topNode, x, y) {
//this.proxy.emit("onInstallationCountrySetConfirmButtonClick");
// this.evenSimu("onCountrySetConfirmButtonClick")
console.log("send onInstallationCountrySetConfirmButtonClick signal!");
//console.log("send onInstallationCountrySetConfirmButtonClick signal!");
},
backToWirelessNetworkBasicPage: function (node, topNode, x, y) {
if (x > 120) {
return;
}
console.log("send onBackToWirelessNetworkBasicPage signal!");
//console.log("send onBackToWirelessNetworkBasicPage signal!");
//this.proxy.emit("onBackToWirelessNetworkBasicPage");
},
......@@ -2137,18 +2137,18 @@
}
//this.proxy.emit("onChooseTimeZoneBackClick");
// this.evenSimu("onTimeZoneSetConfirmButtonClick")
console.log("send onChooseTimeZoneBackClick signal!");
//console.log("send onChooseTimeZoneBackClick signal!");
},
timeZoneSetConfirmButtonClick: function (node, topNode, x, y) {
//this.proxy.emit("onInstallationTimeZoneSetConfirmButtonClick");
// this.evenSimu("onTimeZoneSetConfirmButtonClick")
console.log("send onInstallationTimeZoneSetConfirmButtonClick signal!");
//console.log("send onInstallationTimeZoneSetConfirmButtonClick signal!");
},
gotoTimeZoneSetPageClick: function (node, topNode, x, y) {
//this.proxy.emit("onInstallationGeneralSettingGotoTimeZoneSetPageClick");
//this.evenSimu("onInstallationGeneralSettingGotoTimeZoneSetPageClick")
console.log("send onInstallationGeneralSettingGotoTimeZoneSetPageClick signal!");
//console.log("send onInstallationGeneralSettingGotoTimeZoneSetPageClick signal!");
},
refreshDateTimePage: function (dateFlag, timeFlag) {
if (dateFlag == 0) {
......@@ -2194,7 +2194,7 @@
},
gotoSetDateFormatPage: function () {
console.log("run gotoSetDateFormatPage function!");
//console.log("run gotoSetDateFormatPage function!");
this.showDateFormatFlag = 1 - this.showDateFormatFlag;
this.showTimeFormatFlag = 0;
this.refreshDateTimePage(this.showDateFormatFlag, this.showTimeFormatFlag);
......@@ -2202,7 +2202,7 @@
gotoSetDateValuePage: function () {
this.loadToSetDateValuePage();
console.log("send onInstallationOnGotoGeneralSettingSetDateValuePage signal!");
//console.log("send onInstallationOnGotoGeneralSettingSetDateValuePage signal!");
//this.proxy.emit("onInstallationOnGotoGeneralSettingSetDateValuePage");
this.evenSimu("onInstallationGotoGeneralSettingSetDateValuePage")
......@@ -2211,17 +2211,17 @@
backToDateTimePageClick: function (node, topNode, x, y) {
// this.saveDateValue();
//this.proxy.emit("onBackToDateTimePageClick");
console.log("send onBackToDateTimePageClick signal!");
//console.log("send onBackToDateTimePageClick signal!");
},
dateSetConfirmButtonClick: function (node, topNode, x, y) {
// this.saveDateValue();
//this.proxy.emit("onInstallationDateSetConfirmButtonClick");
this.evenSimu("onInstallationDateSetConfirmButtonClick")
console.log("send onInstallationDateSetConfirmButtonClick signal!");
//console.log("send onInstallationDateSetConfirmButtonClick signal!");
},
evenSimu: function (emitName, value) {
console.log("{evenSimu}emitName=" + emitName + " value=" + value)
//console.log("{evenSimu}emitName=" + emitName + " value=" + value)
switch (emitName) {
case "onInstallationGotoGeneralSettingSetDateValuePage": {
this.$setY(this.activePage, -480);
......@@ -2268,7 +2268,7 @@
break;
}
default: {
console.log("undefined emitName:" + emitName);
//console.log("undefined emitName:" + emitName);
break;
}
}
......@@ -2277,18 +2277,18 @@
// this.saveTimeValue();
//this.proxy.emit("installationOnTimeSetConfirmButtonClick");
this.evenSimu("installationOnTimeSetConfirmButtonClick")
console.log("send installationOnTimeSetConfirmButtonClick signal!");
//console.log("send installationOnTimeSetConfirmButtonClick signal!");
},
setTime24HConfirmButtonClick: function (node, topNode, x, y) {
// this.saveTimeValue();
//this.proxy.emit("installationOnTimeSetConfirmButtonClick");
this.evenSimu("installationOnTimeSetConfirmButtonClick")
console.log("send installationOnTimeSetConfirmButtonClick signal!");
//console.log("send installationOnTimeSetConfirmButtonClick signal!");
},
gotoSetTimeFormatPage: function () {
console.log("run gotoSetTimeFormatPage function!");
//console.log("run gotoSetTimeFormatPage function!");
this.showDateFormatFlag = 0;
this.showTimeFormatFlag = 1 - this.showTimeFormatFlag;
......@@ -2301,7 +2301,7 @@
} else if (userData.timeFormatFlag == 1) {
this.loadToSet24HTimeValuePage();
}
console.log("send onInstallationOnGotoSetTimeValuePage signal!");
//console.log("send onInstallationOnGotoSetTimeValuePage signal!");
//this.proxy.emit("onInstallationOnGotoSetTimeValuePage");
this.evenSimu("onInstallationOnGotoSetTimeValuePage")
},
......@@ -2318,15 +2318,15 @@
},
clickDateTimeList: function (node, topNode, x, y) {
// console.log(x);
// console.log(y);
// //console.log(x);
// //console.log(y);
var id = this.$eval(topNode, "id")
console.log("clicked id=" + id);
//console.log("clicked id=" + id);
if (id == undefined) {
return;
}
var clickValue = Number(id.replace("id_dateTimeListAreaCover", ""));
console.log("clickValue=" + clickValue);
//console.log("clickValue=" + clickValue);
if (Number.isNaN(clickValue)) {
return;
}
......@@ -2378,7 +2378,7 @@
}
break;
default:
console.log("clickDateTimeList clickValue error!");
//console.log("clickDateTimeList clickValue error!");
break;
}
},
......@@ -2392,11 +2392,11 @@
return '0' + num.toString();
} else {
// 如果是小于0或三位数以上的数,这里可以根据需要处理
console.log('Number is not within expected range');
//console.log('Number is not within expected range');
}
},
chooseDateFormatClick: function (node, topNode, x, y) {
console.log("send onChooseDateFormatClick signal!");
//console.log("send onChooseDateFormatClick signal!");
//this.proxy.emit("onChooseDateFormatClick");
this.evenSimu("onChooseDateFormatClick")
},
......@@ -2442,7 +2442,7 @@
return '0' + num.toString();
} else {
// 如果是小于0或三位数以上的数,这里可以根据需要处理
console.log('Number is not within expected range');
//console.log('Number is not within expected range');
}
},
......@@ -2454,9 +2454,9 @@
this.dateMonth = userData.time.month;
this.dateDay = userData.time.day;
console.log("show userData.time.year " + userData.time.year);
console.log("show userData.time.month " + userData.time.month);
console.log("show userData.time.day " + userData.time.day);
//console.log("show userData.time.year " + userData.time.year);
//console.log("show userData.time.month " + userData.time.month);
//console.log("show userData.time.day " + userData.time.day);
if (this.dateFormatFlag == 0) {
......@@ -2466,13 +2466,13 @@
this.crtDateValue = this.padNumberWithZero(this.dateDay) + "-" + this.padNumberWithZero(this
.dateMonth) + "-" + this.dateYear;
}
console.log(this.crtDateValue);
//console.log(this.crtDateValue);
},
saveDateTimeToRTC: function () {
var process = require("@system.process");
if (process.platform == "win32") {
console.log("process.platform == win32,can't run so function!Please retry on Linux board!");
//console.log("process.platform == win32,can't run so function!Please retry on Linux board!");
} else {
librtc.ctrl("set", {
year: userData.setTime.setYear,
......@@ -2514,8 +2514,8 @@
userData.setTime.setHour = hourValue;
userData.time.hour = userData.setTime.setHour;
userData.time.minute = userData.setTime.setMinute;
console.log("userData.time.hour=" + userData.time.hour);
console.log("userData.setTime.setHour=" + userData.setTime.setHour);
//console.log("userData.time.hour=" + userData.time.hour);
//console.log("userData.setTime.setHour=" + userData.setTime.setHour);
this.refreshTimeValue();
this.saveDateTimeToRTC();
},
......@@ -2564,14 +2564,14 @@
this.crtTimeValue = this.padNumberWithZero(this.timeHour) + ":" + this.padNumberWithZero(this
.timeMinute);
}
console.log(+this.crtTimeValue);
//console.log(+this.crtTimeValue);
},
dateOverturnSetConfirmButtonClick: function (node, topNode, x, y) {
// this.saveDateValue();
//this.proxy.emit("onInstallationOnDateOverturnSetConfirmButtonClick");
this.evenSimu("onInstallationOnDateOverturnSetConfirmButtonClick")
console.log("send onInstallationOnDateOverturnSetConfirmButtonClick signal!");
//console.log("send onInstallationOnDateOverturnSetConfirmButtonClick signal!");
},
......@@ -2640,8 +2640,8 @@
gotoGeneralSettingsDateTimePage: function () {
this.refreshDateValue();
this.refreshTimeValue();
console.log("====================================test date time picker value=========================================");
console.log("send onInstallationGotoGeneralSettingsDateTimePage signal!");
//console.log("====================================test date time picker value=========================================");
//console.log("send onInstallationGotoGeneralSettingsDateTimePage signal!");
//this.proxy.emit("onInstallationGotoGeneralSettingsDateTimePage");
// this.evenSimu("onGotoGeneralSettingsDateTimePage");
},
......
......@@ -167,12 +167,12 @@
},
onHide: function () {
console.log(this.$uri + "===========onHide=============");
//console.log(this.$uri + "===========onHide=============");
this.clearTimer();
},
onQuit: function () {
console.log(this.$uri + "===========onQuit=============");
//console.log(this.$uri + "===========onQuit=============");
this.clearTimer();
},
clearTimer: function () {
......@@ -226,10 +226,10 @@
//添加检查全绿为测试功能
globalThis.factoryTest.systemCheck = this.factoryTestSystemCheck;
console.log("=====globalThis.factoryTest.systemCheck:"+globalThis.factoryTest.systemCheck);
//console.log("=====globalThis.factoryTest.systemCheck:"+globalThis.factoryTest.systemCheck);
var yesJumpPage = require("factoryYesJumpPage.js");
console.log("=====yesJumpPage.yesGoToNextPage(factoryTestsystemCheck);")
//console.log("=====yesJumpPage.yesGoToNextPage(factoryTestsystemCheck);")
yesJumpPage.yesGoToNextPage("factoryTestsystemCheck");
},
......@@ -257,7 +257,7 @@
},
movePage: function (oldPage, newPage) {
console.log(oldPage + "==========to==========" + newPage);
//console.log(oldPage + "==========to==========" + newPage);
this.$hide(oldPage); // 跳转页面之前立即关掉toast
this.$setY(oldPage, -480); // hide
this.$show(newPage)
......
......@@ -200,8 +200,8 @@
var sysVersion = "The code has been annotated"
// var appVersion = userData.softwareVersion;
var appVersion = "The code has been annotated"
console.log("sysVersion=" + sysVersion);
console.log("appVersion=" + appVersion);
//console.log("sysVersion=" + sysVersion);
//console.log("appVersion=" + appVersion);
//this.crtSNValue = sysVersion + "-" + appVersion;
this.crtSNValue = userData.aboutSNValue || "NG"
......@@ -216,29 +216,29 @@
if (this.onlyOnceFlag == 0) {
var obj = file.read("product_res.json", "json");
if (obj == undefined) {
console.log("product_res.json is not exist,creat it!");
//console.log("product_res.json is not exist,creat it!");
file.create("product_res.json");
this.saveValue();
return;
}
console.log("product_res.json is exist,continue!");
//console.log("product_res.json is exist,continue!");
this.restoreFactoryTestValues(obj);
this.onlyOnceFlag = 1;
}
console.log("save data to product_res.json!");
//console.log("save data to product_res.json!");
this.saveValue();
},
onShow: function () {
console.log(this.$uri + "===========onShow=============");
//console.log(this.$uri + "===========onShow=============");
if (userData.factoryFlag != 1) {
userData.factoryFlag = 1;
}
console.log("wifiEventJS.enableWLANScanValue()================================================1");
//console.log("wifiEventJS.enableWLANScanValue()================================================1");
if (onestart) {
var wifiEventJS = require("factory_testWifi.js");
wifiEventJS.enableWLANScanValue();
console.log("wifiEventJS.enableWLANScanValue()================================================2");
//console.log("wifiEventJS.enableWLANScanValue()================================================2");
onestart = 0;
}
var process = require("@system.process")
......@@ -273,11 +273,11 @@
onHide: function () {
console.log(this.$uri + "===========onHide=============");
//console.log(this.$uri + "===========onHide=============");
this.clearTimer();
},
onQuit: function () {
console.log(this.$uri + "===========onQuit=============");
//console.log(this.$uri + "===========onQuit=============");
this.clearTimer();
},
......@@ -299,9 +299,9 @@
/*************** work ***************/
touchedBlock: function (node, topnode, x, y) {
console.log("X:" + x + " Y:" + y);
//console.log("X:" + x + " Y:" + y);
var url = this.$eval(topnode, ":url");
console.log("===============url:" + url + "=============== topnode:" + topnode);
//console.log("===============url:" + url + "=============== topnode:" + topnode);
if (url == undefined) return;
var en = parseInt(this.$eval(topnode, ":ena"));
......@@ -310,16 +310,17 @@
}
if (url == "factoryTestClearAll") {
this.clearValue()
console.log("==============factoryTestClearAll================");
//console.log("==============factoryTestClearAll================");
this.initShow();
return;
}
if (url == "factoryTestStart") {
console.log("==============factoryTestStart================");
//console.log("==============factoryTestStart================");
url = "factoryTestColor";
}
if(url == "factoryTestExit"){
var systemCtrl = require("systemCtrl.js");
userData.factoryFlag = 0;
systemCtrl.executeSystemCommand("/mnt/app/quicknode/shell/runFactory.sh 0");
}
router.push({
......@@ -328,7 +329,7 @@
},
blockColorChange: function (relId, val) {
console.log("relId:" + relId + " val:" + val);
//console.log("relId:" + relId + " val:" + val);
const colors = [0x9E9E9E, 0x4CB050, 0xF44236];
this.$setBackgroundColor(relId, colors[Math.min(val, 2)]);
},
......@@ -404,7 +405,7 @@
console.log(saveObj);
//console.log(saveObj);
file.write("product_res.json", saveObj);
// libwifi.syncSave("save");
},
......@@ -424,7 +425,7 @@
// pcba: globalThis.factoryTest.pcba,
start: globalThis.factoryTest.start,
};
console.log(saveObj);
//console.log(saveObj);
file.write("product_res.json", saveObj);
// libwifi.syncSave("save");
},
......
......@@ -185,10 +185,10 @@ function OZ(target, opacityKeyFrame, zoomKeyFrame, duration, delay, timing_funct
/******************************/
function freeuse_1(target, KeyFrame, timeKeyFrame, timing_function, count, direction, callback, area) {
/*console.log(ShowLog);
/*//console.log(ShowLog);
if (ShowLog)
{
console.log(target + " will use " + KeyFrame[0] + " from " + KeyFrame[1] + " to " + KeyFrame[2] + ",keep " + timeKeyFrame[0] + "ms and delay " + timeKeyFrame[1] + "ms,by " +
//console.log(target + " will use " + KeyFrame[0] + " from " + KeyFrame[1] + " to " + KeyFrame[2] + ",keep " + timeKeyFrame[0] + "ms and delay " + timeKeyFrame[1] + "ms,by " +
timing_function + " loop " + count + " times on " + direction + " direction,handle the " + callback + ".");
}*/
area.$anime({
......
......@@ -8,7 +8,7 @@ function commonInitPage(obj) {
that = obj;
}
function movePage (newPage) {
console.log(that.activePage + "==========to==========" + newPage);
//console.log(that.activePage + "==========to==========" + newPage);
that.$hide(that.activePage); // 跳转页面之前立即关掉toast
that.$setY(that.activePage, -480); // hide
that.$show(newPage)
......
......@@ -3,18 +3,18 @@ var _userdata = require("userdata.js");
var userData = _userdata.userData;
var router = require("@system.router");
var appItem = [];
console.log("===============factoryYesJumpPage==============");
//console.log("===============factoryYesJumpPage==============");
function initPage(pageAppItem) {
userData.factoryappItem = pageAppItem;
// console.log("Initialized appItem data: " + appItem);
// console.log("=============================");
// console.log("Initialized appItem data: " + appItem[1].index);
// //console.log("Initialized appItem data: " + appItem);
// //console.log("=============================");
// //console.log("Initialized appItem data: " + appItem[1].index);
}
function testCode(that){
var activePage = that.activePage
console.log("=======================================activePage: " + activePage)
//console.log("=======================================activePage: " + activePage)
}
function yesGoToNextPage(currentPageName) {
......@@ -22,20 +22,20 @@ function yesGoToNextPage(currentPageName) {
// 找到当前页面对应的 appItem
const currentApp = userData.factoryappItem.find(item => item.startup === currentPageName);
if (!currentApp) {
console.log("Current page not found in appItem.");
//console.log("Current page not found in appItem.");
router.push({ path: "factory_testList" });
return;
}
console.log("Current appItem: " + currentPageName);
console.log("appItem", userData.factoryappItem);
//console.log("Current appItem: " + currentPageName);
//console.log("appItem", userData.factoryappItem);
const currentIndex = currentApp.index;
console.log("Current index: " + currentIndex);
//console.log("Current index: " + currentIndex);
// 如果当前 index 为 0,直接返回 factory_testList
if (currentIndex === 0) {
console.log("Current item has index 0, no navigation.");
//console.log("Current item has index 0, no navigation.");
router.push({ path: "factory_testList" });
return;
}
......@@ -62,7 +62,7 @@ function yesGoToNextPage(currentPageName) {
path: nextApp.startup
});
} else {
console.log("No next enabled test item found by increasing index.");
//console.log("No next enabled test item found by increasing index.");
router.push({ path: "factory_testList" });
}
// } catch (error) {
......
......@@ -41,17 +41,17 @@ function create(name) {
egenmd5.update("/mnt/userdataB/files", "/mnt/userdataB/userdata.md5");
}
if (ret == 0) {
console.log(name + " Created Successfully.")
//console.log(name + " Created Successfully.")
} else {
console.log(name + " Created Failed")
console.log("create ErrorCode:" + ret)
//console.log(name + " Created Failed")
//console.log("create ErrorCode:" + ret)
}
}
function write(name, obj) {
var fs = require("@system.fs")
// 新增参数校验逻辑
if (typeof obj === 'undefined' || obj === null || obj === "") {
console.log("Error: Invalid input object");
//console.log("Error: Invalid input object");
return;
}
let tempStr;
......@@ -61,12 +61,12 @@ function write(name, obj) {
try {
tempStr = JSON.stringify(obj);
} catch (e) {
console.log("Error: Object serialization failed");
//console.log("Error: Object serialization failed");
return;
}
}
// console.log(obj)
// //console.log(obj)
// 获取文件名
var filenm = getFileName(name)
......@@ -91,10 +91,10 @@ function write(name, obj) {
}
if (ret == 0) {
console.log(name + " write Successfully.")
//console.log(name + " write Successfully.")
} else {
console.log(name + " write Failed")
console.log("write ErrorCode:" + ret)
//console.log(name + " write Failed")
//console.log("write ErrorCode:" + ret)
}
}
......@@ -108,7 +108,7 @@ function check(name, obj) {
var partFilePath = "../../../../../mnt/userdataA/files/" + filenm
}
if (fs.exists(partFilePath)) {
console.log("the " + name + " is exists.")
//console.log("the " + name + " is exists.")
return 0
} else {
return -1
......@@ -116,7 +116,7 @@ function check(name, obj) {
}
function read(name, mode) {
var fs = require("@system.fs")
console.log("In Read function name is :" + name)
//console.log("In Read function name is :" + name)
var filenm = getFileName(name)
//构造相对路径
if (process.platform == "win32") {
......@@ -128,7 +128,7 @@ function read(name, mode) {
if (check(partFilePath)) {
return undefined
}
console.log("In Read function path is :" + partFilePath);
//console.log("In Read function path is :" + partFilePath);
if (mode == "json") {
var ret = fs.readFile(partFilePath, "r")
var data = JSON.parse(ret)
......@@ -136,14 +136,14 @@ function read(name, mode) {
var ret = fs.readFile(partFilePath, "rb")
var data = ret
}
console.log(data)
//console.log(data)
return data
}
function checkBasicPath(name, obj) {
var fs = require("@system.fs")
if (fs.exists(name)) {
console.log("the " + name + " is exists.")
//console.log("the " + name + " is exists.")
return 0
} else {
return -1
......@@ -152,9 +152,9 @@ function checkBasicPath(name, obj) {
function readBasicPath(name, mode) {
var fs = require("@system.fs")
console.log("In readBasicPath name = " + name)
console.log("In readBasicPath mode = " + mode)
console.log("In readBasicPath checkBasicPath(name) = " + checkBasicPath(name))
//console.log("In readBasicPath name = " + name)
//console.log("In readBasicPath mode = " + mode)
//console.log("In readBasicPath checkBasicPath(name) = " + checkBasicPath(name))
if (checkBasicPath(name)) {
return undefined
}
......
......@@ -57,8 +57,8 @@ function setTextColorByValue(that, fullKey, value) {
if (value === "NG") ngCount++;
// 3. 等所有项都检测完再写全局变量
console.log("textValueKeys.length: " + textValueKeys.length + ", checkedCount: " + checkedCount + ", ngCount: " + ngCount)
console.log("factoryTestSystemCheck: " + that.factoryTestSystemCheck)
//console.log("textValueKeys.length: " + textValueKeys.length + ", checkedCount: " + checkedCount + ", ngCount: " + ngCount)
//console.log("factoryTestSystemCheck: " + that.factoryTestSystemCheck)
if (checkedCount === textValueKeys.length) {
that.factoryTestSystemCheck = (ngCount === 0) ? 1 : 2;
......@@ -181,7 +181,7 @@ function startSystemInfoTimer(obj) {
systemInfoTimer = setInterval(() => {
updateSystemInfo();
}, 5000);
console.log("系统信息定时器已启动(5000ms)");
//console.log("系统信息定时器已启动(5000ms)");
}
// 停止定时器
......@@ -189,9 +189,9 @@ function stopSystemInfoTimer() {
if (systemInfoTimer) {
clearInterval(systemInfoTimer);
systemInfoTimer = null;
console.log("系统信息定时器已停止");
//console.log("系统信息定时器已停止");
} else {
console.log("定时器未启动");
//console.log("定时器未启动");
}
}
......@@ -271,15 +271,15 @@ function getTotalStorageInfo() {
totalAvailableMB += convertToMB(available);
}
// console.log(`总容量: ${totalSizeMB.toFixed(2)} MB`);
// console.log(`总剩余空间: ${totalAvailableMB.toFixed(2)} MB`);
// //console.log(`总容量: ${totalSizeMB.toFixed(2)} MB`);
// //console.log(`总剩余空间: ${totalAvailableMB.toFixed(2)} MB`);
return {
totalSizeMB: totalSizeMB.toFixed(2),
totalAvailableMB: totalAvailableMB.toFixed(2)
};
} else {
// console.log("无法读取存储信息");
// //console.log("无法读取存储信息");
return {
totalSizeMB: "NG",
totalAvailableMB: "NG"
......@@ -308,10 +308,10 @@ function getCPUTemperature() {
const tempStr = fs.read("/tmp/cpu_temp.txt", "r");
if (tempStr) {
const tempC = parseInt(tempStr.trim()) / 1000;
// console.log(`CPU温度: ${tempC.toFixed(2)} ℃`);
// //console.log(`CPU温度: ${tempC.toFixed(2)} ℃`);
return tempC.toFixed(2);
} else {
// console.log("无法读取CPU温度");
// //console.log("无法读取CPU温度");
return "NG";
}
}
......@@ -324,10 +324,10 @@ function getCPUFrequency() {
const freqStr = fs.read("/tmp/cpu_freq.txt", "r");
if (freqStr) {
const freqMHz = parseInt(freqStr.trim()) / 1000;
// console.log(`CPU频率: ${freqMHz.toFixed(0)} MHz`);
// //console.log(`CPU频率: ${freqMHz.toFixed(0)} MHz`);
return freqMHz.toFixed(0);
} else {
// console.log("无法读取CPU频率");
// //console.log("无法读取CPU频率");
return "NG";
}
}
......@@ -345,7 +345,7 @@ function checkLicense() {
var filenm = "operation_license"
var partFilePath = "../../../../../mnt/extsd/msdkFiles/" + filenm
if (fs.exists(partFilePath)) {
console.log("the " + filenm + " is exists.")
//console.log("the " + filenm + " is exists.")
return 1;
// return "已注册!";
}
......
......@@ -138,14 +138,14 @@ function parseWifiScanResults(output) {
function onGotoWlanEnterPasswordPageEvent(value, signal, encrypted) {
console.log("receive onGotoWlanEnterPasswordPage singal!");
//console.log("receive onGotoWlanEnterPasswordPage singal!");
// var activePage = that.activePage;
that.crtTitleWlanEnterPasswordText = value; //刷新标题
that.crtTitleWlanConnectingText = value;
connectWifiSSID = value;
signalLevel = signal;
_encryptedMode = encrypted;
console.log("==========signalLevel :" + signalLevel + "connectWifiSSID :" + connectWifiSSID + "=======");
//console.log("==========signalLevel :" + signalLevel + "connectWifiSSID :" + connectWifiSSID + "=======");
that.crtEnterPasswordShowText = "";
that.crtEnterPasswordShowInvisiableText = "";
that.output = ""; //每次从外面进入页面时,还原已经输入的字符
......@@ -157,7 +157,7 @@ function onGotoWlanEnterPasswordPageEvent(value, signal, encrypted) {
// function connect_wifi(ssid, psk) {
function connect_wifi(ssid, psk, mode) {
console.log("===============connect_wifi: " + ssid + "===psk: " + psk + "===mode: " + mode);
//console.log("===============connect_wifi: " + ssid + "===psk: " + psk + "===mode: " + mode);
writeWpaConf.set(ssid, psk, mode)
systemCtrl.executeSystemCommand("/tmp/wlanInit.sh &") //重启wifi连接
return
......@@ -184,7 +184,7 @@ function connect_wifi(ssid, psk, mode) {
// }
// else {
console.log("ssid: " + ssid + "psk " + psk + "mode " + mode);
//console.log("ssid: " + ssid + "psk " + psk + "mode " + mode);
// writeWpaConf.set(ssid, psk, mode)
// systemCtrl.executeSystemCommand("/tmp/wlanInit.sh &") //重启wifi连接
// // return
......@@ -203,7 +203,7 @@ function diConnectWifi() {
}
function WifiNoActive() {
console.log("=====WifiNoActive=====");
//console.log("=====WifiNoActive=====");
userData.wlanSsid = null;
userData.wlanSignalLevel = 0;
......@@ -231,7 +231,7 @@ function refreshWifiList(wifi_list) {
width: 420,
}, enableWLANListItemSearchDiv)
}
console.log("=====refreshWifiListlog=====1");
//console.log("=====refreshWifiListlog=====1");
// if (wifi_list_div) {
// wifi_div.removeChild(wifi_list_div)
// }
......@@ -242,7 +242,7 @@ function refreshWifiList(wifi_list) {
width: 420,
"background-color": "#000000",
}, wifi_div)
console.log("=====refreshWifiListlog=====2");
//console.log("=====refreshWifiListlog=====2");
var top = 0;
for (var i = 0; i < wifi_list.length; i++) {
// if (wifi_list[i].ssid == userData.wlanSsid) {
......@@ -252,7 +252,7 @@ function refreshWifiList(wifi_list) {
var signalLevel = wifi_list[i].signalLevel
var isEncrypted = wifi_list[i].isEncrypted
var encryptedMode = wifi_list[i].encryptedMode
console.log("========ssid:" + ssid + " signalLevel:" + signalLevel + " isEncrypted:" + isEncrypted + " encryptedMode:" + encryptedMode + "=====")
//console.log("========ssid:" + ssid + " signalLevel:" + signalLevel + " isEncrypted:" + isEncrypted + " encryptedMode:" + encryptedMode + "=====")
if (ssid.length == 0)
continue
......@@ -304,9 +304,9 @@ function refreshWifiList(wifi_list) {
onclick: function (node, topNode, x, y) {
// node.attributes.text = "selected";
// systemCtrl.executeSystemCommand("/mnt/app/quicknode/shell/eAplay.sh /mnt/app/voice_click.wav");
console.log("node.attributes.text = " + this.attributes.text + " node.attributes.signalValue = " + this.attributes.signalValue);
console.log("click wlan_list_item"); //需要添加一个点击事件
console.log("this.attributes.ssid = " + this.attributes.ssid);
//console.log("node.attributes.text = " + this.attributes.text + " node.attributes.signalValue = " + this.attributes.signalValue);
//console.log("click wlan_list_item"); //需要添加一个点击事件
//console.log("this.attributes.ssid = " + this.attributes.ssid);
onGotoWlanEnterPasswordPageEvent(this.attributes.ssid, this.attributes.signalValue, this.attributes.encryptedMode);
// proxy.emit("onGotoWlanEnterPasswordPage", this.attributes.text, this.attributes.signalValue);
}
......@@ -345,20 +345,20 @@ function refreshWifiList(wifi_list) {
wifi_list_div.setAttribute('height', top)
wifi_div.setAttribute('height', top)
console.log("top=", top)
//console.log("top=", top)
// that.$setHeight("id_enableWLANListItemTemplate",top);
}
function enableWLANSwitch() {
console.log("Is @@@@@@@@@@@@@@@@@@@@@@@@@@#3333333")
//console.log("Is @@@@@@@@@@@@@@@@@@@@@@@@@@#3333333")
// if (!userData.enableWLANSwitchFlag) {
// return;
// }
var process = require("@system.process")
if (process.platform == "win32") {
console.log("its win32.")
//console.log("its win32.")
return;
}
if (resultsWifiList && oneFlag) {
......@@ -372,10 +372,10 @@ function enableWLANSwitch() {
systemCtrl.executeSystemCommand("wpa_cli -p /tmp/wpa_supplicant/sockets scan_results > /tmp/scan_result.txt")
var content = fs.read("/tmp/scan_result.txt", "r")
console.log("====================content")
//console.log("====================content")
if (content) {
resultsWifiList = parseWifiScanResults(content)
console.log(JSON.stringify(resultsWifiList))
//console.log(JSON.stringify(resultsWifiList))
refreshWifiList(resultsWifiList)
}
}, 5000)
......@@ -386,9 +386,9 @@ function enableWLANSwitch() {
function getWifiInfo(ssid) {
console.log("getWifiInfo called with SSID: " + ssid);
//console.log("getWifiInfo called with SSID: " + ssid);
if (!resultsWifiList) {
console.log("resultsWifiList is not available.");
//console.log("resultsWifiList is not available.");
return null; // 如果 resultsWifiList 为空,则返回 null
}
......@@ -396,14 +396,14 @@ function getWifiInfo(ssid) {
let foundWifi = null;
for (let i = 0; i < resultsWifiList.length; i++) {
if (resultsWifiList[i].ssid === ssid) {
console.log("Found SSID: " + ssid);
//console.log("Found SSID: " + ssid);
foundWifi = resultsWifiList[i];
break;
}
}
if (!foundWifi) {
console.log("SSID not found: " + ssid);
//console.log("SSID not found: " + ssid);
return {
ssid: ssid,
signalLevel: null, // 信号强度为空
......@@ -445,9 +445,9 @@ function getWifiInfo(ssid) {
function onInstallationGeneralSettingConnectWifi(value) {
console.log("receive onInstallationGeneralSettingConnectWifi singal!");
//console.log("receive onInstallationGeneralSettingConnectWifi singal!");
console.log("Send cmd to connect wifi,connecting...");
//console.log("Send cmd to connect wifi,connecting...");
if (value != undefined) {
connectWifiPassword = value;
......@@ -463,7 +463,7 @@ function onInstallationGeneralSettingConnectWifi(value) {
var passWordBytes = Array.from(passWordCode, char => char.charCodeAt(0));
var passWordHexString = passWordBytes.map(byte => byte.toString(16).padStart(2, '0')).join('|');
cmdStr += passWordHexString + "|";
console.log("aaaaaaaaaaaaaaaaaaaaaaaa==================")
//console.log("aaaaaaaaaaaaaaaaaaaaaaaa==================")
var msdk6ACmdArr = cloudComSerial.serialMsdkCmdArrayPack(0x6A, cmdStr);
cloudComSerial.sendCmd(msdk6ACmdArr);
......@@ -482,7 +482,7 @@ function onInstallationGeneralSettingConnectWifi(value) {
connectTimeout++;
} else {
connectTimeout = 0;
console.log("wifi connect success!");
//console.log("wifi connect success!");
setAreaButtonDivOn();
......@@ -497,7 +497,7 @@ function onInstallationGeneralSettingConnectWifi(value) {
}
if (connectTimeout > 60) {
console.log("wifi connect timeout!");
//console.log("wifi connect timeout!");
setAreaButtonDivOn();
WifiNoActive();
......@@ -512,7 +512,7 @@ function onInstallationGeneralSettingConnectWifi(value) {
//使用wpa模式去连wifi
connectWifiByWpa(connectWifiSSID, connectWifiPassword, function (result) {
if (result == 0) {
console.log("Connect wifi success");
//console.log("Connect wifi success");
setTimeout(() => {
console.debug("Will send 0xF3 request to msdk");
//向msdk发送0xF3请求联网命令
......@@ -523,7 +523,7 @@ function onInstallationGeneralSettingConnectWifi(value) {
connectingState = 1
// gotoConnectSuccessPage()
} else {
console.log("Connect wifi failed");
//console.log("Connect wifi failed");
//跳转失败页面
connectTimeout = 70
// gotoConnectFailedPage()
......@@ -539,26 +539,26 @@ function ConnectWifi(value) {
var ssid = connectWifiSSID;
var pwd = value;
var encrypte = _encryptedMode;
// console.log("ConnectWifi: " + ssid + "pwd: " + pwd + "encrypte: " + encrypte);
// //console.log("ConnectWifi: " + ssid + "pwd: " + pwd + "encrypte: " + encrypte);
// var factory_wifi = require("factory_wifi.js");
// factory_wifi.testWifiConnect(ssid, pwd);
// connect_wifi(ssid,pwd);
that.initWifissid = ssid;
that.initWifipwd = pwd;
that.initencryptedMode = encrypte;
// console.log("that.initWifissid: " + that.initWifissid + "that.initWifipwd: " + that.initWifipwd + "that.initencryptedMode: " + that.initencryptedMode);
// //console.log("that.initWifissid: " + that.initWifissid + "that.initWifipwd: " + that.initWifipwd + "that.initencryptedMode: " + that.initencryptedMode);
that.InterValTime();
// console.log("===================ConnectWifi: " + that.initWifissid + "--pwd: " + that.initWifipwd);
// //console.log("===================ConnectWifi: " + that.initWifissid + "--pwd: " + that.initWifipwd);
}
function enableWLANScanValue() {
console.log("Is @@@@@@@@@@@@@@@@@@@@@@@@@@#3333333")
//console.log("Is @@@@@@@@@@@@@@@@@@@@@@@@@@#3333333")
// if (!userData.enableWLANSwitchFlag) {
// return;
// }
var process = require("@system.process")
if (process.platform == "win32") {
console.log("its win32.")
//console.log("its win32.")
return;
}
......@@ -570,7 +570,7 @@ function enableWLANScanValue() {
var content = fs.read("/tmp/scan_result.txt", "r")
if (content) {
resultsWifiList = parseWifiScanResults(content)
console.log(JSON.stringify(resultsWifiList))
//console.log(JSON.stringify(resultsWifiList))
// refreshWifiList(resultsWifiList)
}
}, 5000)
......
......@@ -32,7 +32,7 @@ function getCurrentTime() {
// if (dateT.getUTCHours() < 10) hourdata = "0" + dateT.getUTCHours();
// else if (dateT.getUTCHours() >= 10 && dateT.getUTCHours() <= 24)
// hourdata = dateT.getUTCHours();
console.log("hour=" + dateT.getHours());
//console.log("hour=" + dateT.getHours());
hourdata = dateT.getHours().toString().padStart(2, "0");
if (dateT.getMinutes() < 10) minutedata = "0" + dateT.getMinutes();
......@@ -45,10 +45,10 @@ function getCurrentTime() {
var tempstr2 = "";
// tempstr2 = hourdata + ":" + minutedata;
tempstr2 = hourdata + ":" + minutedata + ":" + secondData;
// console.log("tempstr1=" + tempstr1);
// console.log("tempstr2=" + tempstr2);
// //console.log("tempstr1=" + tempstr1);
// //console.log("tempstr2=" + tempstr2);
tempstr1 = tempstr1 + " " + tempstr2;
// console.log("tempstr1+tempstr2=" + tempstr1);
// //console.log("tempstr1+tempstr2=" + tempstr1);
//更新时间字符串
var obj = {
// "dataHours": dataHours,
......@@ -63,7 +63,7 @@ function getCurrentTime() {
return tempstr1;
}
// console.log(getCurrentTime());
// //console.log(getCurrentTime());
function setCurrentTime(obj) {
//设置当前时间
......
......@@ -13,7 +13,7 @@ function getFactoryFullPath() {
case 1:
return "/mnt/app/quicknode/tests/re860_factory/";
default:
console.log("getFactoryFullPath: env error");
//console.log("getFactoryFullPath: env error");
return "/mnt/app/quicknode/tests/re860_factory/";
}
}
......
......@@ -18,7 +18,7 @@ function checkKeypad() {
activeScreen()
keyValue = keypadAction
if (keypadAction != 0) {
console.log("keypadAction:" + keypadAction);
//console.log("keypadAction:" + keypadAction);
doKeyPadMatter(keypadAction);
}
//end
......@@ -28,7 +28,7 @@ function activeScreen() {
longTimeNop = crtTime
}
function checkLongTimeNop() {
// console.log("crtTime=" + crtTime + " longTimeNop=" + longTimeNop)
// //console.log("crtTime=" + crtTime + " longTimeNop=" + longTimeNop)
if (crtTime - longTimeNop > longTimeNopMax) {
globalThis.eventEmitter.emit("logicLongTimeNop", "logic-checkLongTimeNop");
}
......@@ -44,17 +44,17 @@ function doKeyPadMatter(keyValue) {
switch (keyValue) {
case 13: {
globalThis.eventEmitter.emit("logicKeypadTouched1", "logic-doKeyPadMatter");
console.log("No.1 has been pressed.")
//console.log("No.1 has been pressed.")
break;
}
case 15: {
globalThis.eventEmitter.emit("logicKeypadTouched2", "logic-doKeyPadMatter");
console.log("No.2 has been pressed.")
//console.log("No.2 has been pressed.")
break;
}
case 17: {
globalThis.eventEmitter.emit("logicKeypadTouched3", "logic-doKeyPadMatter");
console.log("No.3 has been pressed.")
//console.log("No.3 has been pressed.")
break;
}
default:
......
var dlfcn = require("dlfcna.js");
console.log(dlfcn)
//console.log(dlfcn)
var funcs = [
["changeBgLight", "iii"],
];
console.log("in factory_bglight.js")
//console.log("in factory_bglight.js")
function register() {
console.log("will register bglight.so")
//console.log("will register bglight.so")
var isSuccess = dlfcn.register("@native.bglight", "./lib/factory/bglight.so", funcs);
if (isSuccess) {
console.log("load so successfully")
//console.log("load so successfully")
var bglight = require("@native.bglight");
return bglight
} else {
console.log("load so failed")
//console.log("load so failed")
}
return undefined;
}
var bglight = register();
function changeBgLight(value) {
console.log("Change the screen bglight to the highest!")
//console.log("Change the screen bglight to the highest!")
// bglight.changeBgLight(2, value)
}
......@@ -32,7 +32,7 @@ function changeBgLight(value) {
// bglight.pwmInit()
// }
// function pwm(val) {
// console.log("pwm:" + val)
// //console.log("pwm:" + val)
// if (globalThis.Simu.En == 1) {
// return 0
// }
......
var dlfcn = require("dlfcna.js");
console.log(dlfcn)
//console.log(dlfcn)
var funcs = [
["get_ble_mac_address", "ss"],
];
console.log("in factory_bleInfo.js")
//console.log("in factory_bleInfo.js")
function register() {
console.log("will register test_ble.so")
//console.log("will register test_ble.so")
var isSuccess = dlfcn.register("@native.test_ble", "./lib/factory/test_ble.so", funcs);
if (isSuccess) {
console.log("load so successfully")
//console.log("load so successfully")
var test_ble = require("@native.test_ble");
return test_ble
} else {
console.log("load so failed")
//console.log("load so failed")
}
return undefined;
}
......@@ -24,15 +24,15 @@ function read(option) {
// option -> "mac" // return "78:22:88:7B:65:3F"
// option -> "qos" // return "11"
// return test_ble.read(option);
console.log("will read ble info")
//console.log("will read ble info")
var mac = undefined;
try {
mac = test_ble.get_ble_mac_address();
} catch (e) {
mac = undefined
console.log("!!!ERROR:" + e)
//console.log("!!!ERROR:" + e)
}
// console.log("mac: " + mac)
// //console.log("mac: " + mac)
return mac;
}
......
var dlfcn = require("dlfcna.js");
console.log(dlfcn);
//console.log(dlfcn);
var funcs = [["generate_md5_for_directory", "vss"]];
console.log("in factory_egenmd5.js");
//console.log("in factory_egenmd5.js");
function register() {
console.log("will register saveData process.platform=" + process.platform)
//console.log("will register saveData process.platform=" + process.platform)
if (process.platform == "win32") {
console.log("***will register win32_register_func*****")
//console.log("***will register win32_register_func*****")
const Win32RegFunc = require("win32_register_func.js").Win32RegFunc;
var win32Reg = new Win32RegFunc(funcs);
return win32Reg;
}
console.log("will register egenmd5.so");
//console.log("will register egenmd5.so");
var isSuccess = dlfcn.register(
"@native.egenmd5",
"./lib/factory/egenmd5.so",
funcs
);
if (isSuccess) {
console.log("load so successfully");
//console.log("load so successfully");
var egenmd5 = require("@native.egenmd5");
return egenmd5;
} else {
console.log("load so failed");
//console.log("load so failed");
}
return undefined;
}
......
var dlfcn = require("dlfcna.js");
console.log(dlfcn)
//console.log(dlfcn)
var funcs = [
["get_modem_signal", "ss"],
......@@ -7,16 +7,16 @@ var funcs = [
["get_modem_imei", "ss"],
];
console.log("in factory_esim.js")
//console.log("in factory_esim.js")
function register() {
console.log("will register test_modem.so")
//console.log("will register test_modem.so")
var isSuccess = dlfcn.register("@native.test_modem", "./lib/factory/test_modem.so", funcs);
if (isSuccess) {
console.log("load so successfully")
//console.log("load so successfully")
var test_modem = require("@native.test_modem");
return test_modem
} else {
console.log("load so failed")
//console.log("load so failed")
}
return undefined;
}
......@@ -32,7 +32,7 @@ function read(option) {
value = test_modem.get_modem_signal();
} catch (e) {
value = undefined
console.log("!!!ERROR:" + e)
//console.log("!!!ERROR:" + e)
}
break;
case "iccid":
......@@ -40,7 +40,7 @@ function read(option) {
value = test_modem.get_modem_iccid();
} catch (e) {
value = undefined
console.log("!!!ERROR:" + e)
//console.log("!!!ERROR:" + e)
}
break;
case "imei":
......@@ -48,15 +48,15 @@ function read(option) {
value = test_modem.get_modem_imei();
} catch (e) {
value = undefined
console.log("!!!ERROR:" + e)
//console.log("!!!ERROR:" + e)
}
break;
default:
break;
}
console.log("....");
console.log("============" + "read" + option + "/// value:" + value + "============");
console.log("....");
//console.log("....");
//console.log("============" + "read" + option + "/// value:" + value + "============");
//console.log("....");
return value;
}
......
var dlfcn = require("dlfcna.js");
console.log(dlfcn)
//console.log(dlfcn)
var funcs = [
["startFiveInch", "v"],
......@@ -7,16 +7,16 @@ var funcs = [
["read", "is"],
];
console.log("in factory_fiveInch.js")
//console.log("in factory_fiveInch.js")
function register() {
console.log("will register fiveInch.so")
//console.log("will register fiveInch.so")
var isSuccess = dlfcn.register("@native.fiveInch", "./lib/factory/fiveInch.so", funcs);
if (isSuccess) {
console.log("load so successfully")
//console.log("load so successfully")
var fiveInch = require("@native.fiveInch");
return fiveInch
} else {
console.log("load so failed")
//console.log("load so failed")
}
return undefined;
}
......
var dlfcn = require("dlfcna.js");
console.log(dlfcn)
//console.log(dlfcn)
var funcs = [
["soundInit", "v"],
["soundOn", "v"],
......@@ -37,19 +37,19 @@ var funcs = [
["gpioInit", "v"],
];
console.log("in factory_rd190_factory.js")
//console.log("in factory_rd190_factory.js")
function register() {
console.log("will register rd190_factory.so")
//console.log("will register rd190_factory.so")
if (globalThis.Simu.En == 1) {
return undefined
}
var isSuccess = dlfcn.register("@native.rd190_factory", "./lib/factory/rd190_factory.so", funcs);
if (isSuccess) {
console.log("load so successfully")
//console.log("load so successfully")
var rd190_factory = require("@native.rd190_factory");
return rd190_factory
} else {
console.log("load so failed")
//console.log("load so failed")
}
return undefined;
}
......@@ -76,7 +76,7 @@ function soundOn() {
rd190_factory.soundOn()
}
function pwm(val) {
console.log("pwm:" + val)
//console.log("pwm:" + val)
if (globalThis.Simu.En == 1) {
return 0
}
......@@ -109,8 +109,8 @@ function pwm(val) {
}
}
function gpio(index, status) {
console.log("index:" + index)
console.log("status:" + status)
//console.log("index:" + index)
//console.log("status:" + status)
if (globalThis.Simu.En == 1) {
return 0
}
......
var dlfcn = require("dlfcna.js");
console.log(dlfcn)
//console.log(dlfcn)
var funcs = [
["set", "viiiiii"],
["isRTC", "is"],
];
console.log("in factory_rtc.js")
//console.log("in factory_rtc.js")
function register() {
console.log("will register rtc.so")
//console.log("will register rtc.so")
var isSuccess = dlfcn.register("@native.rtc", "./lib/factory/rtc.so", funcs);
if (isSuccess) {
console.log("load so successfully")
//console.log("load so successfully")
var rtc = require("@native.rtc");
return rtc
} else {
console.log("load so failed")
//console.log("load so failed")
}
return undefined;
}
......@@ -33,7 +33,7 @@ function ctrl(word, obj) {
break
}
default: {
console.log("ERROR:rtc ctrl word undefined..")
//console.log("ERROR:rtc ctrl word undefined..")
}
}
}
......@@ -45,14 +45,14 @@ function getrtc(word) {
ret = rtc.isRTC("rtc1")
} catch (e) {
ret = 0
console.log("!!!ERROR:" + e)
//console.log("!!!ERROR:" + e)
}
console.log(ret);
//console.log(ret);
return ret
// break
}
default: {
console.log("ERROR:rtc getRTC word undefined..")
//console.log("ERROR:rtc getRTC word undefined..")
}
}
}
......
var dlfcn = require("dlfcna.js");
console.log(dlfcn)
//console.log(dlfcn)
var funcs = [
["executeSync", "vi"],
......@@ -14,26 +14,26 @@ var funcs = [
["executePrint", "is"],
];
console.log("in systemCtrl.js")
//console.log("in systemCtrl.js")
function register() {
if (globalThis.$simulatorFlag == true) {
return undefined
}
var process = require("@system.process")
if (process.platform == "win32") {
console.log("***will register win32_register_func*****")
//console.log("***will register win32_register_func*****")
const Win32RegFunc = require("win32_register_func.js").Win32RegFunc;
var win32Reg = new Win32RegFunc(funcs);
return win32Reg;
}
console.log("will register systemCtrl.so")
//console.log("will register systemCtrl.so")
var isSuccess = dlfcn.register("@native.systemCtrl", "./lib/factory/systemCtrl.so", funcs);
if (isSuccess) {
console.log("load so successfully")
//console.log("load so successfully")
var systemCtrl = require("@native.systemCtrl");
return systemCtrl
} else {
console.log("load so failed")
//console.log("load so failed")
}
return undefined;
}
......@@ -44,10 +44,10 @@ function sync(value) {
}
function findSwuFile(value) {
console.log("There are in findSwuFile function! ");
//console.log("There are in findSwuFile function! ");
var findSwuFlag = 0;
findSwuFlag = systemCtrl.findSwuFile(value);
console.log("findSwuFlag=" + findSwuFlag);
//console.log("findSwuFlag=" + findSwuFlag);
return findSwuFlag;
}
......@@ -57,41 +57,41 @@ function executeSwuUpdate(value1, value2) {
if ((value1 == 1 || value1 == 0) && (value2 == 1)) {
updateFlag = systemCtrl.executeUpdate(value1);
}
console.log("updateFlag=" + updateFlag);
//console.log("updateFlag=" + updateFlag);
}
function executeSystemCommand(cmd) {
var executeFlag = systemCtrl.executeSystemCommand(cmd);
// console.log("executeFlag=" + executeFlag);
// //console.log("executeFlag=" + executeFlag);
// if (executeFlag == -1) {
// console.log("executeSystemCommand failed!");
// //console.log("executeSystemCommand failed!");
// }
// else {
// console.log("executeSystemCommand success!");
// //console.log("executeSystemCommand success!");
// }
}
function executePrint(str) {
console.log("There are in executePrint function! ");
//console.log("There are in executePrint function! ");
var executeFlag = systemCtrl.executePrint(str);
}
function systemReboot(value) {
systemCtrl.systemReboot(value);
console.log("There are in systemReboot function! ");
//console.log("There are in systemReboot function! ");
}
function checkPartition(value) {
console.log("There are in checkPartition function! ");
//console.log("There are in checkPartition function! ");
var checkValue = systemCtrl.checkPartition(value);
console.log("checkValue=" + checkValue);
//console.log("checkValue=" + checkValue);
return checkValue;
}
function systemMain(value) {
systemCtrl.systemMain(value);
console.log("There are in systemMain function! ");
//console.log("There are in systemMain function! ");
}
module.exports = {
......
var dlfcn = require("dlfcna.js");
console.log(dlfcn)
//console.log(dlfcn)
var funcs = [
["startlte", "v"],
......@@ -7,16 +7,16 @@ var funcs = [
["read", "is"],
];
console.log("in factory_testlte.js")
//console.log("in factory_testlte.js")
function register() {
console.log("will register lte.so")
//console.log("will register lte.so")
var isSuccess = dlfcn.register("@native.lte", "./lib/factory/lte.so", funcs);
if (isSuccess) {
console.log("load so successfully")
//console.log("load so successfully")
var lte = require("@native.lte");
return lte
} else {
console.log("load so failed")
//console.log("load so failed")
}
return undefined;
}
......
var dlfcn = require("dlfcna.js");
console.log(dlfcn)
//console.log(dlfcn)
var funcs = [
["isWifi", "is"],
......@@ -10,16 +10,16 @@ var funcs = [
["get_wifi_mac", "ss"],
];
console.log("in factory_wifi.js")
//console.log("in factory_wifi.js")
function register() {
console.log("will register testWifi.so")
//console.log("will register testWifi.so")
var isSuccess = dlfcn.register("@native.wifi", "./lib/factory/testWifi.so", funcs);
if (isSuccess) {
console.log("load so successfully")
//console.log("load so successfully")
var wifi = require("@native.wifi");
return wifi
} else {
console.log("load so failed")
//console.log("load so failed")
}
return undefined;
}
......@@ -33,9 +33,9 @@ function testWifiConnect(word, SSID) {
ret = wifi.isWifi(SSID);
} catch (e) {
ret = 0
console.log("!!!ERROR:" + e)
//console.log("!!!ERROR:" + e)
}
console.log("ret[0]=" + ret);
//console.log("ret[0]=" + ret);
return ret;
}
case "getSignal": {
......@@ -44,28 +44,28 @@ function testWifiConnect(word, SSID) {
ret = wifi.getWifiSignalLevel("signal");
} catch (e) {
ret = -999
console.log("!!!ERROR:" + e)
//console.log("!!!ERROR:" + e)
}
console.log("ret[1]=" + ret);
//console.log("ret[1]=" + ret);
return ret;
}
default: {
console.log("ERROR:wifi testWifiConnect word undefined..")
//console.log("ERROR:wifi testWifiConnect word undefined..")
}
}
}
function initWifiTest(word) {
console.log("start run initWifiTest function");
//console.log("start run initWifiTest function");
switch (word) {
case "init": {
var ret = wifi.initWifi(word);
console.log(ret);
//console.log(ret);
return ret
// break
}
default: {
console.log("ERROR:wifi initTest word undefined..")
//console.log("ERROR:wifi initTest word undefined..")
}
}
}
......@@ -78,14 +78,14 @@ function getSysVersion(word) {
ret = wifi.getVersion(word);
} catch (e) {
ret = "1.0.0"
console.log("!!!ERROR:" + e)
//console.log("!!!ERROR:" + e)
}
console.log("ret=" + ret);
//console.log("ret=" + ret);
return ret
// break
}
default: {
console.log("ERROR:wifi getSysVersion word undefined..")
//console.log("ERROR:wifi getSysVersion word undefined..")
}
}
}
......@@ -98,26 +98,26 @@ function syncSave(word) {
ret = wifi.syncSave(word);
} catch (e) {
ret = 1
console.log("!!!ERROR:" + e)
//console.log("!!!ERROR:" + e)
}
console.log("ret=" + ret);
//console.log("ret=" + ret);
return ret
}
default: {
console.log("ERROR:wifi getSysVersion word undefined..")
//console.log("ERROR:wifi getSysVersion word undefined..")
}
}
}
function getWifiMac() {
console.log("getWifiMac///////////////////////////////////////////");
//console.log("getWifiMac///////////////////////////////////////////");
var mac = undefined
try {
mac = wifi.get_wifi_mac();
} catch (e) {
mac = "00:11:22:33:44:55"
console.log("!!!ERROR:" + e)
//console.log("!!!ERROR:" + e)
}
console.log("mac=" + mac);
//console.log("mac=" + mac);
return mac;
}
......
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