add Banglejs 1 compatibity to the terminal clock app

pull/1595/head
Stiralbios 2022-03-20 09:55:43 +01:00
parent bbd2cac110
commit 5cb7e0620c
3 changed files with 22 additions and 8 deletions

View File

@ -1,2 +1,3 @@
0.01: New App!
0.02: Rename "Activity" in "Motion" and display the true values for it
0.03: Add Banglejs 1 compatibility

View File

@ -1,16 +1,28 @@
var locale = require("locale");
var fontColor = g.theme.dark ? "#0f0" : "#000";
var paddingY = 2;
var font6x8At4Size = 32;
var font6x8At2Size = 18;
var heartRate = 0;
// handling the differents versions of the Banglejs smartwatch
if (process.env.HWVERSION == 1){
var paddingY = 3;
var font6x8At4Size = 48;
var font6x8At2Size = 27;
var font6x8FirstTextSize = 6;
var font6x8DefaultTextSize = 3;
}
else{
var paddingY = 2;
var font6x8At4Size = 32;
var font6x8At2Size = 18;
var font6x8FirstTextSize = 4;
var font6x8DefaultTextSize = 2;
}
function setFontSize(pos){
if(pos == 1)
g.setFont("6x8", 4);
g.setFont("6x8", font6x8FirstTextSize);
else
g.setFont("6x8", 2);
g.setFont("6x8", font6x8DefaultTextSize);
}
function clearField(pos){

View File

@ -3,11 +3,12 @@
"name": "Terminal Clock",
"shortName":"Terminal Clock",
"description": "A terminal cli like clock displaying multiple sensor data",
"version":"0.02",
"version":"0.03",
"icon": "app.png",
"type": "clock",
"tags": "clock",
"supports": ["BANGLEJS2"],
"supports": ["BANGLEJS", "BANGLEJS2"],
"allow_emulator": true,
"readme": "README.md",
"storage": [
{"name": "terminalclock.app.js","url": "app.js"},