Fix rssi_norm overflow
This commit is contained in:
parent
a75baea8d2
commit
9bcb04890b
|
@ -171,8 +171,10 @@ function parseResult(command, infos_array) {
|
||||||
// Iterate over array
|
// Iterate over array
|
||||||
for (var i = 0, l=infos_array.length; i<l; i++) {
|
for (var i = 0, l=infos_array.length; i<l; i++) {
|
||||||
// Get filename, time/length
|
// Get filename, time/length
|
||||||
document.getElementById("status_"+infos_array[i].host).innerHTML = infos_array[i].file + " <br/> " + infos_array[i].time + " / " + infos_array[i].leng;
|
if (infos_array[i].status) {
|
||||||
medias_status[infos_array[i].id] = infos_array[i].pos;
|
document.getElementById("status_"+infos_array[i].host).innerHTML = infos_array[i].file + " <br/> " + infos_array[i].time + " / " + infos_array[i].leng;
|
||||||
|
medias_status[infos_array[i].id] = infos_array[i].pos;
|
||||||
|
}
|
||||||
// Find currently playing element
|
// Find currently playing element
|
||||||
//~ var pl_length = document.getElementById("timeline").getAttribute("length");
|
//~ var pl_length = document.getElementById("timeline").getAttribute("length");
|
||||||
//~ for (j=0,k=pl_length;j<k;j++){
|
//~ for (j=0,k=pl_length;j<k;j++){
|
||||||
|
@ -292,7 +294,7 @@ function parseResult(command, infos_array) {
|
||||||
document.getElementById("wl_"+i).style.backgroundColor = "hsl(0, 0%, 65%)";
|
document.getElementById("wl_"+i).style.backgroundColor = "hsl(0, 0%, 65%)";
|
||||||
};
|
};
|
||||||
// Color it
|
// Color it
|
||||||
for (i=0, l=rssi_norm; i<l;i++) {
|
for (i=0, l=rssi_norm>4?4:rssi_norm; i<l;i++) {
|
||||||
document.getElementById("wl_"+i).style.backgroundColor = "hsl(" + signal_color + ", 100%, 50%)";
|
document.getElementById("wl_"+i).style.backgroundColor = "hsl(" + signal_color + ", 100%, 50%)";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue