Skip to content

Commit

Permalink
fix battery level
Browse files Browse the repository at this point in the history
  • Loading branch information
novvember committed Jun 26, 2024
1 parent 311fc06 commit 27bd893
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nothing-elaborate/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"appName": "Elaborate",
"appType": "watchface",
"version": {
"code": 1,
"name": "1.0.0"
"code": 2,
"name": "1.0.1"
},
"icon": "icon.png",
"vender": "novvember",
Expand Down
2 changes: 1 addition & 1 deletion nothing-elaborate/watchface/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ WatchFace({

const update = () => {
const { current } = hmSensor.createSensor(hmSensor.id.BATTERY);
const level = Math.ceil(current / (100 / 25));
const level = Math.round(current * 24 / 100);
const imageSrc = `battery/${level}.png`;

textWidget.setProperty(hmUI.prop.TEXT, `${current}%\n${BATTERY.postfix}`);
Expand Down

0 comments on commit 27bd893

Please sign in to comment.