Commit 8700e8c9 authored by waterword's avatar waterword

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

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