Fix naming of variable
parent
fdc519c3df
commit
144f4d3196
|
|
@ -47,7 +47,7 @@ function formatDuration(millis) {
|
||||||
|
|
||||||
function draw() {
|
function draw() {
|
||||||
layout.icon.txt = current.txt;
|
layout.icon.txt = current.txt;
|
||||||
layout.icon.cond = current.code;
|
layout.icon.code = current.code;
|
||||||
const temp = locale.temp(current.temp-273.15).match(/^(\D*\d*)(.*)$/);
|
const temp = locale.temp(current.temp-273.15).match(/^(\D*\d*)(.*)$/);
|
||||||
layout.temp.label = temp[1];
|
layout.temp.label = temp[1];
|
||||||
layout.tempUnit.label = temp[2];
|
layout.tempUnit.label = temp[2];
|
||||||
|
|
|
||||||
|
|
@ -312,14 +312,11 @@ exports.drawIcon = function(cond, x, y, r) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const code = cond.code || -1;
|
if (cond.code > 0) {
|
||||||
if (code > 0) {
|
chooseIconByCode(cond.code)(x, y, r);
|
||||||
chooseIconByCode(code.code)(x, y, r);
|
|
||||||
} else {
|
} else {
|
||||||
chooseIcon(cond.txt)(x, y, r);
|
chooseIcon(cond.txt)(x, y, r);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(cond);
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue