20180927_jeffrey - silenceuncrio/diary GitHub Wiki
0920
ariel 表示 M360P signal 的顯示還是有異常
My mode is "dual router" mode.
Sometimes the signal bar is not right (X).
LED and RSSI are all right.
相關網頁程式碼如下
<p class="navbar-text">
<img ng-src="{{vm.get_signal_img(vm.help.signal)}}" height="20"> {{vm.help.rssi}} {{vm.help.operator}}</p>
signal 的值來自 vm.help.signal
RSSI 的值來自 vm.help.rssi
相關的 javascript 為 app.controller.js
function interval_10sec_fn() {
icos.status.top()
.then(function(result) {
vm.top = result.data.top;
vm.help.signal = vm.top.signal;
if (vm.top.lte_cur_proto_state == 2) {
vm.help.operator = vm.top.modem_operator_name;
} else {
vm.help.operator = "";
}
vm.help.sysUpTime_text = time2text(vm.top.sysUpTime);
if (vm.top.lte_cur_rssi == 0) {
vm.help.rssi = "(RSSI: N/A)"
} else {
vm.help.rssi = "(RSSI: " + vm.top.lte_cur_rssi + " dBm)"
}
})
}
var interval_10sec = $interval(interval_10sec_fn, 10000);
interval_10sec_fn();
$scope.$on("$destroy", function (event) {
$interval.cancel(interval_10sec);
});
可以發現 vm.help.signal
的值已經跟 share 完全沒關係
我應該去 check 一下 ariel 網頁的 source code 確認是否為 catch 所引起
1000
發現 ariel 那邊 interval_10sec_fn()
沒有每 10 秒觸發一次
我想我應該把以下的 code 拿掉
$scope.$on("$destroy", function (event) {
$interval.cancel(interval_10sec);
});
不過要確定一下會不會重複的觸發 $interval
從 uptime 可以觀察到時間是每 10 秒刷一次的
先觀察一下在決定要不要上 code
1015
先準備兩台 M360P 給 shin
1040
回到 ariel 反應的問題
修改 proscend/prosrc/www/app/app.controller.js
@@ -115,7 +115,8 @@ function appController($scope, $translate, $templateCache, $interval, icos, shar
interval_10sec_fn();
$scope.$on("$destroy", function (event) {
- $interval.cancel(interval_10sec);
+ console.log('someone destroy me(app.controller.js)');
+ //$interval.cancel(interval_10sec);
});
}
又可觀察又可避免問題
開個 HTTPS 連上 M360P 放著觀察一下
1045
昨天 52XXZ aaron 早上 build 出來的 image 確認沒有問題
我在 proscend 外層作以下動作
make distclean
source proenv.sh
make
再來就是等待 building 囉
1100
複製出 ariel 那邊的現象了
問題發生的當下
的確我要的 signal 值為 0
已告知 ariel
看來不是 app.controller.js
的問題
不過我剛剛也知道為什麼 interval 會停掉了
因為 M360P 重開機了
function interval_10sec_fn() {
icos.status.top()
.then(function(result) {
...
})
}
應該就咬在 icos.status.top().then(...)
看來重開機是另一個 issue
1125
monkeyjj time
複習 A Complete Firebase in React Authentication Tutorial
1150
52XXZ proscend 外層 build 好了
進 proscend 再 build image... ok
確認該 image 是否還有昨天的現象... 消失了
1305
monkeyjj time
1630
52XXZ 雖然沒有昨天的現象
但 lan 的連線還是有問題
好好地連線依但拔掉網路線
隨便選一個 port 再插上去就沒有反應了
1730
明天 M360P 的 release 取消
順延一個禮拜
看來可以切過去 52XXZ 做事了
aaron 已經放棄 busybox 的升級
pull code 再針對 proscend 外層
make distclean
source proenv.sh
make