mirror of https://github.com/espruino/BangleApps
myprofile: Add weight
parent
49fbc6a252
commit
9271c2e6ca
|
@ -0,0 +1,2 @@
|
||||||
|
0.01: New App!
|
||||||
|
0.02: Add weight
|
|
@ -10,6 +10,7 @@ Configure your personal profile. All settings are optional and are only stored o
|
||||||
| HR max | maximum heart rate | BPM | BPM | 60 | Use maximum value when exercising.<br/> If unsure set to 220-age. |
|
| HR max | maximum heart rate | BPM | BPM | 60 | Use maximum value when exercising.<br/> If unsure set to 220-age. |
|
||||||
| HR min | minimum heart rate | BPM | BPM | 200 | Measure your heart rate after waking up |
|
| HR min | minimum heart rate | BPM | BPM | 200 | Measure your heart rate after waking up |
|
||||||
| Height | Body height | local length unit | meter | 0 (=not set) | - |
|
| Height | Body height | local length unit | meter | 0 (=not set) | - |
|
||||||
|
| Weight | Body weight | kg | kf | 0 (=not set) | - |
|
||||||
| Stride length | distance traveled with one step | local length unit | meter | 0 (=not set) | Walk 10 steps and divide the travelled distance by 10 |
|
| Stride length | distance traveled with one step | local length unit | meter | 0 (=not set) | Walk 10 steps and divide the travelled distance by 10 |
|
||||||
|
|
||||||
## Developer notes
|
## Developer notes
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"shortName":"My Profile",
|
"shortName":"My Profile",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"type": "settings",
|
"type": "settings",
|
||||||
"version":"0.01",
|
"version":"0.02",
|
||||||
"description": "Configure your personal profile. All settings are optional and only stored on the watch.",
|
"description": "Configure your personal profile. All settings are optional and only stored on the watch.",
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"tags": "tool,utility",
|
"tags": "tool,utility",
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
strideLength: 0, // 0 = not set
|
strideLength: 0, // 0 = not set
|
||||||
birthday: '1970-01-01',
|
birthday: '1970-01-01',
|
||||||
height: 0, // 0 = not set
|
height: 0, // 0 = not set
|
||||||
|
weight: 0, // 0 = not set
|
||||||
}, require('Storage').readJSON(FILE, true) || {});
|
}, require('Storage').readJSON(FILE, true) || {});
|
||||||
|
|
||||||
function writeProfile() {
|
function writeProfile() {
|
||||||
|
@ -101,6 +102,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/*LANG*/"Weight": {
|
||||||
|
value: myprofile.weight,
|
||||||
|
min:0,
|
||||||
|
step:1,
|
||||||
|
format: v => v ? v + "kg" : '-',
|
||||||
|
onchange: v => {
|
||||||
|
myprofile.weight=v;
|
||||||
|
writeProfile();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
/*LANG*/'HR max': {
|
/*LANG*/'HR max': {
|
||||||
format: v => /*LANG*/`${v} BPM`,
|
format: v => /*LANG*/`${v} BPM`,
|
||||||
value: myprofile.maxHrm,
|
value: myprofile.maxHrm,
|
||||||
|
|
Loading…
Reference in New Issue