new templates for M2 2.2" and M2 2.6"

This commit is contained in:
Nic Limper
2024-11-04 23:53:54 +01:00
parent e6401f6840
commit 7805ab2b46
7 changed files with 56 additions and 57 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -681,7 +681,7 @@ void drawTextBox(TFT_eSprite &spr, String &content, int16_t &posx, int16_t &posy
switch (processFontPath(font)) {
case 2: {
// truetype
Serial.println("truetype font not implemented for drawStringBox");
Serial.println("truetype font not implemented for drawTextBox");
} break;
case 3: {
// vlw bitmap font

View File

@@ -1895,11 +1895,12 @@ function showPreview(previewWindow, element) {
console.log('refresh ' + element.mac);
previewWindow.pending = element.pending;
previewWindow.hash = "";
let cachetag = Date.now();
if (element.isexternal && element.contentMode == 12) {
imageSrc = 'http://' + tagDB[element.mac].apip + '/getdata?mac=' + element.mac + '&md5=0000000000000000';
imageSrc = 'http://' + tagDB[element.mac].apip + '/getdata?mac=' + element.mac + '&md5=0000000000000000&c=' + cachetag;
} else {
imageSrc = '/getdata?mac=' + element.mac + '&md5=0000000000000000';
imageSrc = '/getdata?mac=' + element.mac + '&md5=0000000000000000&c=' + cachetag;
}
} else if (element.hash != previewWindow.hash) {

View File

@@ -56,12 +56,10 @@ export async function initUpdate() {
.then(([sdata, rdata]) => {
if (sdata.env) {
let matchtest = '';
if (parseInt(sdata.buildversion) != parseInt(filesystemversion) && filesystemversion != "custom" && sdata.buildversion != "custom") matchtest = " <- not matching!"
print(`env: ${sdata.env}`);
print(`build date: ${formatEpoch(sdata.buildtime)}`);
print(`esp32 version: ${sdata.buildversion}`);
print(`filesystem version: ${filesystemversion}` + matchtest);
print(`filesystem version: ${filesystemversion}`);
print(`psram size: ${sdata.psramsize}`);
print(`flash size: ${sdata.flashsize}`);
print("--------------------------", "gray");

View File

@@ -1,5 +1,5 @@
{
"version": 3,
"version": 4,
"name": "M2 2.2\"",
"width": 212,
"height": 104,
@@ -12,43 +12,42 @@
},
"shortlut": 2,
"options": [ "button", "customlut" ],
"contentids": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 27 ],
"contentids": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, 19, 20, 21, 22, 23, 27 ],
"template": {
"1": {
"weekday": [ 106, 2, "Signika-SB.ttf", 40 ],
"date": [ 106, 60, "Signika-SB.ttf", 30 ]
"weekday": [ 106, 5, "fonts/calibrib40", 40 ],
"date": [ 106, 55, "fonts/calibrib30", 30 ]
},
"2": {
"fonts": [ "Signika-SB.ttf", 150, 150, 150, 115, 90, 70 ],
"xy": [ 106, 52 ]
"fonts": [ "Signika-SB.ttf", 135, 135, 100, 90, 70, 50 ],
"xy": [ 106, 44 ]
},
"16": {
"location": [ 7, 15, "t0_14b_tf" ],
"title": [ 210, 11, "glasstown_nbp_tf" ],
"cols": [ 4, 121, 10, "glasstown_nbp_tf" ],
"bars": [ 10, 110, 8 ]
"location": [ 4, 10, "glasstown_nbp_tf" ],
"title": [ 165, 10, "glasstown_nbp_tf" ],
"cols": [ 4, 101, 8, "glasstown_nbp_tf" ],
"bars": [ 5, 90, 6 ]
},
"4": {
"location": [ 5, 3, "fonts/bahnschrift30" ],
"wind": [ 245, 3, "fonts/bahnschrift30" ],
"temp": [ 10, 60, "fonts/bahnschrift70" ],
"icon": [ 240, 20, 70, 2 ],
"dir": [ 210, -12, 40 ],
"location": [ 5, 3, "fonts/calibrib16.vlw" ],
"wind": [ 190, 3, "fonts/bahnschrift30" ],
"temp": [ 5, 30, "fonts/calibrib70" ],
"icon": [ 180, 25, 50, 2 ],
"dir": [ 170, -12, 40 ],
"umbrella": [ 175, -50, 25 ]
},
"8": {
"location": [ 5, 12, "t0_14b_tf" ],
"column": [ 5, 51 ],
"day": [ 28, 18, "fonts/twcondensed20", 41, 108 ],
"icon": [ 28, 55, 30 ],
"wind": [ 18, 26 ],
"line": [ 20, 128 ]
"column": [ 4, 53 ],
"day": [ 28, 18, "fonts/twcondensed20", 38, 88 ],
"icon": [ 28, 48, 25 ],
"wind": [ 18, 24 ],
"line": [ 20, 100 ]
},
"9": {
"title": [ 8, 2, "bahnschrift20.vlw", 25 ],
"items": 5,
"line": [ 8, 25, "REFSAN12.vlw" ],
"title": [ 3, 2, "fonts/calibrib16", 25 ],
"items": 4,
"line": [ 3, 20, "tahoma9.vlw" ],
"desc": [ 0, 5, "", 1 ]
},
"10": {
@@ -58,26 +57,26 @@
"11": {
"mode": 0,
"days": 1,
"title": [ 10, 2, "fonts/bahnschrift20" ],
"date": [ 245, 2 ],
"items": 7,
"red": [ 0, 21, 256, 14 ],
"line": [ 10, 32, 15, "t0_14b_tf", 50 ]
"title": [ 5, 2, "fonts/calibrib16.vlw" ],
"date": [ 205, 2 ],
"items": 8,
"red": [ 0, 21, 211, 10 ],
"line": [ 5, 21, 11, "tahoma9.vlw", 50 ]
},
"21": [
{ "text": [ 10, 5, "OpenEpaperLink AP", "bahnschrift20", 1, 0, 0 ] },
{ "text": [ 10, 50, "IP address:", "t0_14b_tf", 1, 0, 0 ] },
{ "text": [ 110, 50, "{ap_ip}", "t0_14b_tf", 1, 0, 0 ] },
{ "text": [ 100, 50, "{ap_ip}", "t0_14b_tf", 1, 0, 0 ] },
{ "text": [ 10, 70, "Channel:", "t0_14b_tf", 1, 0, 0 ] },
{ "text": [ 110, 70, "{ap_ch}", "t0_14b_tf", 1, 0, 0 ] },
{ "text": [ 100, 70, "{ap_ch}", "t0_14b_tf", 1, 0, 0 ] },
{ "text": [ 10, 90, "Tag count:", "t0_14b_tf", 1, 0, 0 ] },
{ "text": [ 110, 90, "{ap_tagcount}", "t0_14b_tf", 1, 0, 0 ] }
{ "text": [ 100, 90, "{ap_tagcount}", "t0_14b_tf", 1, 0, 0 ] }
],
"27": {
"bars": [ 26, 216, 80, 20 ],
"bars": [ 20, 180, 65, 12, 10 ],
"time": [ "tahoma9.vlw" ],
"yaxis": [ "tahoma9.vlw", 6, 6 ],
"head": [ "bahnschrift20.vlw" ]
"yaxis": [ "tahoma9.vlw", 2, 6 ],
"head": [ "fonts/calibrib16.vlw" ]
}
}
}

View File

@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"name": "M2 2.6\"",
"width": 296,
"height": 152,
@@ -15,39 +15,40 @@
"contentids": [ 22, 23, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 27 ],
"template": {
"1": {
"weekday": [ 148, -3, "Signika-SB.ttf", 60 ],
"date": [ 148, 65, "Signika-SB.ttf", 48 ]
"weekday": [ 148, 9, "Signika-SB.ttf", 60 ],
"date": [ 148, 73, "Signika-SB.ttf", 48 ]
},
"2": {
"fonts": [ "Signika-SB.ttf", 150, 150, 150, 120, 100, 80 ],
"xy": [ 148, 53 ]
"fonts": [ "Signika-SB.ttf", 170, 170, 170, 120, 100, 80 ],
"xy": [ 148, 62 ]
},
"16": {
"location": [ 5, 5, "fonts/bahnschrift30" ],
"title": [ 247, 11, "glasstown_nbp_tf" ],
"cols": [ 1, 125, 12, "glasstown_nbp_tf" ],
"bars": [ 5, 111, 10 ]
"cols": [ 1, 149, 12, "glasstown_nbp_tf" ],
"bars": [ 5, 135, 10 ]
},
"4": {
"location": [ 5, 5, "fonts/bahnschrift30" ],
"wind": [ 280, 5, "fonts/bahnschrift30" ],
"temp": [ 5, 65, "fonts/bahnschrift70" ],
"icon": [ 285, 20, 70, 2 ],
"temp": [ 5, 58, "fonts/calibrib90" ],
"icon": [ 280, 35, 80, 2 ],
"dir": [ 235, -12, 40 ],
"umbrella": [ 190, -50, 25 ]
"umbrella": [ 190, -30, 25 ]
},
"8": {
"location": [ 5, 12, "t0_14b_tf" ],
"column": [ 5, 59 ],
"day": [ 30, 18, "fonts/twcondensed20", 41, 108 ],
"day": [ 30, 20, "fonts/twcondensed20", 41, 105 ],
"rain": [ 34, 130 ],
"icon": [ 30, 55, 30 ],
"wind": [ 18, 26 ],
"line": [ 20, 128 ]
"line": [ 20, 150 ]
},
"9": {
"title": [ 2, 0, "bahnschrift20.vlw", 25 ],
"title": [ 3, 2, "bahnschrift20.vlw", 25 ],
"items": 8,
"line": [ 1, 25, "REFSAN12.vlw" ],
"line": [ 3, 25, "REFSAN12.vlw" ],
"desc": [ 0, 5, "", 1 ]
},
"10": {
@@ -59,7 +60,7 @@
"days": 1,
"title": [ 5, 2, "fonts/bahnschrift20" ],
"date": [ 290, 2 ],
"items": 7,
"items": 9,
"red": [ 0, 21, 296, 14 ],
"line": [ 5, 32, 15, "t0_14b_tf", 50 ]
},
@@ -73,7 +74,7 @@
{ "text": [ 120, 90, "{ap_tagcount}", "t0_14b_tf", 1, 0, 0 ] }
],
"27": {
"bars": [ 9, 288, 90, 11 ],
"bars": [ 9, 288, 90, 11, 15 ],
"time": [ "tahoma9.vlw" ],
"yaxis": [ "tahoma9.vlw", 0, 6 ],
"head": [ "calibrib30.vlw" ]