smartbatt: use object-shorthand

master^2^2
Rob Pilling 2025-08-17 18:35:27 +01:00
parent c138ba003d
commit c7ae986446
1 changed files with 3 additions and 3 deletions

View File

@ -43,10 +43,10 @@
//update clock info according to batt state
if (Bangle.isCharging()) {
return { text: batt+"%", img : img};
return { text: batt+"%", img };
}
else{
return { text: getHrsFormatted(data.hrsLeft), img : img};
return { text: getHrsFormatted(data.hrsLeft), img };
}
},
@ -66,7 +66,7 @@
get : () => {
drawBatt()
var data=require("smartbatt").get();
return { text: data.avgDrainage.toFixed(2)+"/h", img : img};
return { text: data.avgDrainage.toFixed(2)+"/h", img };
},
show : function() {