mirror of https://github.com/espruino/BangleApps
settings 0.45: Add calibrate battery option
parent
d3a0128bc8
commit
1b290a6982
|
@ -48,3 +48,4 @@
|
|||
0.43: Add some Bangle 1 colours to theme customizer
|
||||
0.44: Add "Start Week On X" option (#1780)
|
||||
UI improvements to Locale and Date & Time menu
|
||||
0.45: Add calibrate battery option
|
||||
|
|
|
@ -13,7 +13,6 @@ This is Bangle.js's settings menu
|
|||
* **LCD** Configure settings about the screen. How long it stays on, how bright it is, and when it turns on - see below.
|
||||
* **Theme** Adjust the colour scheme
|
||||
* **Utils** Utilities - including resetting settings (see below)
|
||||
* **Turn Off** Turn Bangle.js off
|
||||
|
||||
## BLE - Bluetooth Settings
|
||||
|
||||
|
@ -61,5 +60,7 @@ The exact effects depend on the app. In general the watch will not wake up by i
|
|||
* **Compact Storage** Removes deleted/old files from Storage - this will speed up your Bangle.js
|
||||
* **Rewrite Settings** Should not normally be required, but if `.boot0` has been deleted/corrupted (and so no settings are being loaded) this will fix it.
|
||||
* **Flatten Battery** Turns on all devices and draws as much power as possible, attempting to flatten the Bangle.js battery. This can still take 5+ hours.
|
||||
* **Calibrate Battery** If you're finding your battery percentage meter isn't accurate, leave your Bangle.js on charge for at least 3 hours, and then choose this menu option. It will measure the battery voltage when full and will allow Bangle.js to report a more accurate battery percentage.
|
||||
* **Reset Settings** Reset the settings (as set in this app) to defaults. Does not reset settings for other apps.
|
||||
* **Factory Reset** (not available on Bangle.js 1) - wipe **everything** and return to a factory state
|
||||
* **Turn Off** Turn Bangle.js off
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "setting",
|
||||
"name": "Settings",
|
||||
"version": "0.44",
|
||||
"version": "0.45",
|
||||
"description": "A menu for setting up Bangle.js",
|
||||
"icon": "settings.png",
|
||||
"tags": "tool,system",
|
||||
|
|
|
@ -546,6 +546,18 @@ function showUtilMenu() {
|
|||
var i=1000;while (i--);
|
||||
}, 1);
|
||||
},
|
||||
/*LANG*/'Calibrate Battery': () => {
|
||||
E.showPrompt(/*LANG*/"Is the battery fully charged?",{title:/*LANG*/"Calibrate"}).then(ok => {
|
||||
if (ok) {
|
||||
var s=require("Storage").readJSON("setting.json");
|
||||
s.batFullVoltage = (analogRead(D3)+analogRead(D3)+analogRead(D3)+analogRead(D3))/4;
|
||||
require("Storage").writeJSON("setting.json",s);
|
||||
E.showAlert(/*LANG*/"Calibrated!").then(() => load("settings.app.js"));
|
||||
} else {
|
||||
E.showAlert(/*LANG*/"Please charge Bangle.js for 3 hours and try again").then(() => load("settings.app.js"));
|
||||
}
|
||||
});
|
||||
},
|
||||
/*LANG*/'Reset Settings': () => {
|
||||
E.showPrompt(/*LANG*/'Reset to Defaults?',{title:/*LANG*/"Settings"}).then((v) => {
|
||||
if (v) {
|
||||
|
|
Loading…
Reference in New Issue