commit
b2202cf5ad
|
|
@ -10,3 +10,4 @@
|
||||||
0.09: Add default HRM value, default altitude value
|
0.09: Add default HRM value, default altitude value
|
||||||
0.10: Add fastloading
|
0.10: Add fastloading
|
||||||
0.11: Add option for ISO 8601 date format
|
0.11: Add option for ISO 8601 date format
|
||||||
|
0.12: Add day of week line
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@
|
||||||
|
|
||||||
["L2", "L3", "L4", "L5", "L6", "L7", "L8", "L9"].forEach((line) => {
|
["L2", "L3", "L4", "L5", "L6", "L7", "L8", "L9"].forEach((line) => {
|
||||||
if (this[line] === "Date") drawDate(date, this.isoDate, curPos);
|
if (this[line] === "Date") drawDate(date, this.isoDate, curPos);
|
||||||
|
else if (this[line] === "DOW") drawDOW(date, curPos);
|
||||||
else if (this[line] === "HR") drawHRM(curPos);
|
else if (this[line] === "HR") drawHRM(curPos);
|
||||||
else if (this[line] === "Motion") drawMotion(curPos);
|
else if (this[line] === "Motion") drawMotion(curPos);
|
||||||
else if (this[line] === "Alt") drawAltitude(curPos);
|
else if (this[line] === "Alt") drawAltitude(curPos);
|
||||||
|
|
@ -132,7 +133,8 @@
|
||||||
date = ">" + year + "-" + month + "-" + day;
|
date = ">" + year + "-" + month + "-" + day;
|
||||||
} else {
|
} else {
|
||||||
let dow = locale.dow(now, 1);
|
let dow = locale.dow(now, 1);
|
||||||
date = locale.date(now, 1).substr(0, 6) + locale.date(now, 1).substr(-2);
|
date = locale.date(now, 1).substr(0, 6); // day and month e.g. 01/02/ from 01/02/2003
|
||||||
|
date += locale.date(now, 1).substr(-2); // short year e.g. 03 from 01/02/2003
|
||||||
date = ">" + dow + " " + date;
|
date = ">" + dow + " " + date;
|
||||||
}
|
}
|
||||||
drawLine(date, pos);
|
drawLine(date, pos);
|
||||||
|
|
@ -142,6 +144,10 @@
|
||||||
drawLine(">", pos);
|
drawLine(">", pos);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let drawDOW = function (now, pos) {
|
||||||
|
drawLine(">" + locale.dow(now, 0), pos);
|
||||||
|
};
|
||||||
|
|
||||||
let drawStepCount = function (pos) {
|
let drawStepCount = function (pos) {
|
||||||
let health = Bangle.getHealthStatus("day");
|
let health = Bangle.getHealthStatus("day");
|
||||||
let steps_formated = ">Steps: " + health.steps;
|
let steps_formated = ">Steps: " + health.steps;
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,14 @@
|
||||||
"name": "Terminal Clock",
|
"name": "Terminal Clock",
|
||||||
"shortName": "Terminal Clock",
|
"shortName": "Terminal Clock",
|
||||||
"description": "A terminal CLI like clock displaying configurable, multiple sensor data",
|
"description": "A terminal CLI like clock displaying configurable, multiple sensor data",
|
||||||
"version": "0.11",
|
"version": "0.12",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"type": "clock",
|
"type": "clock",
|
||||||
"tags": "clock",
|
"tags": "clock",
|
||||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
"supports": [
|
||||||
|
"BANGLEJS",
|
||||||
|
"BANGLEJS2"
|
||||||
|
],
|
||||||
"allow_emulator": false,
|
"allow_emulator": false,
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"storage": [
|
"storage": [
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.HWVERSION == 2) {
|
if (process.env.HWVERSION == 2) {
|
||||||
var lineType = ["Date", "HR", "Motion", "Alt", "Steps", ">", "Empty"];
|
var lineType = [
|
||||||
|
"Date",
|
||||||
|
"DOW",
|
||||||
|
"HR",
|
||||||
|
"Motion",
|
||||||
|
"Alt",
|
||||||
|
"Steps",
|
||||||
|
">",
|
||||||
|
"Empty",
|
||||||
|
];
|
||||||
} else {
|
} else {
|
||||||
var lineType = ["Date", "HR", "Motion", "Steps", ">", "Empty"];
|
var lineType = ["Date", "DOW", "HR", "Motion", "Steps", ">", "Empty"];
|
||||||
}
|
}
|
||||||
function getLineChooser(lineID) {
|
function getLineChooser(lineID) {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue