Skip to content

Commit

Permalink
new flexible tagtype definition
Browse files Browse the repository at this point in the history
- new: tagtypes are be defined via json in /tagtypes instead of hardcoded
- content template is moved to the tagtype definition
- optimalisation of spr2buffer (also uses psram now, if available)
- bugfixes in spiffseditor
- size fix in painter screen for large screens
  • Loading branch information
nlimper committed Aug 8, 2023
1 parent 55e50b1 commit 09f7466
Show file tree
Hide file tree
Showing 25 changed files with 519 additions and 348 deletions.
129 changes: 0 additions & 129 deletions ESP32_AP-Flasher/data/content_template.json

This file was deleted.

38 changes: 38 additions & 0 deletions ESP32_AP-Flasher/data/tagtypes/00.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "ST‐GR16000 1.54\"",
"width": 152,
"height": 152,
"rotatebuffer": 0,
"bpp": 2,
"colors": 3,
"colortable": {
"white": [255, 255, 255],
"black": [0, 0, 0],
"red": [255, 0, 0],
"gray": [150, 150, 150]
},
"capabilities": ["button", "customlut"],
"template": {
"1": {
"weekday": [ 76, 10, "fonts/calibrib30" ],
"month": [ 76, 120, "fonts/calibrib30" ],
"day": [ 76, 42, "fonts/calibrib100" ]
},
"2": {
"fonts": [ "fonts/calibrib120", "fonts/calibrib80", "fonts/calibrib50", "fonts/calibrib50" ],
"xy": [ 76, 83 ]
},
"4": {
"location": [ 10, 145, "t0_14b_tf" ],
"wind": [ 140, 10, "fonts/bahnschrift30" ],
"temp": [ 10, 10, "fonts/bahnschrift30" ],
"icon": [ 75, 26, 70, 1 ],
"dir": [ 110, -12, 40 ],
"umbrella": [ 125, 110, 30 ]
},
"10": {
"title": [ 10, 15, "t0_14b_tf" ],
"pos": [ 76, 20 ]
}
}
}
64 changes: 64 additions & 0 deletions ESP32_AP-Flasher/data/tagtypes/01.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"name": "ST‐GR29000 2.9\"",
"width": 296,
"height": 128,
"rotatebuffer": 1,
"bpp": 2,
"colors": 3,
"colortable": {
"white": [255, 255, 255],
"black": [0, 0, 0],
"red": [255, 0, 0],
"gray": [150, 150, 150]
},
"capabilities": ["button", "customlut"],
"template": {
"1": {
"weekday": [148, 10, "fonts/calibrib60"],
"date": [148, 73, "fonts/calibrib50"]
},
"16": {
"location": [ 5, 5, "fonts/bahnschrift30" ],
"title": [ 247, 11, "glasstown_nbp_tf" ],
"cols": [ 1, 125, 12, "glasstown_nbp_tf" ],
"bars": [ 5, 111, 10 ]
},
"2": {
"fonts": ["fonts/calibrib150", "fonts/calibrib150", "fonts/calibrib120", "fonts/calibrib100"],
"xy": [148, 74]
},
"4": {
"location": [5, 5, "fonts/bahnschrift30"],
"wind": [280, 5, "fonts/bahnschrift30"],
"temp": [5, 65, "fonts/bahnschrift70"],
"icon": [285, 20, 70, 2],
"dir": [245, -12, 40],
"umbrella": [190, -50, 25]
},
"8": {
"location": [5, 12, "t0_14b_tf"],
"column": [5, 59],
"day": [30, 18, "fonts/twcondensed20", 41, 108],
"icon": [30, 55, 30],
"wind": [18, 26],
"line": [20, 128]
},
"9": {
"title": [5, 3, "fonts/bahnschrift20"],
"items": 8,
"line": [5, 34, 13],
"font": "glasstown_nbp_tf"
},
"10": {
"title": [10, 5, "fonts/bahnschrift20"],
"pos": [149, 25]
},
"11": {
"title": [5, 2, "fonts/bahnschrift20"],
"date": [290, 2],
"items": 7,
"red": [0, 21, 296, 14],
"line": [5, 32, 15, "t0_14b_tf", 50]
}
}
}
60 changes: 60 additions & 0 deletions ESP32_AP-Flasher/data/tagtypes/02.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "ST‐GR420B3N2 4.2\"",
"width": 400,
"height": 300,
"rotatebuffer": 0,
"bpp": 2,
"colors": 3,
"colortable": {
"white": [255, 255, 255],
"black": [0, 0, 0],
"red": [255, 0, 0],
"gray": [150, 150, 150]
},
"capabilities": ["button", "customlut"],
"template": {
"1": {
"weekday": [ 200, 25, "fonts/calibrib60" ],
"month": [ 200, 225, "fonts/calibrib60" ],
"day": [ 200, 95, "fonts/calibrib150" ]
},
"2": {
"fonts": [ "fonts/calibrib150", "fonts/calibrib150", "fonts/calibrib150", "fonts/calibrib120" ],
"xy": [ 200, 148 ]
},
"4": {
"location": [ 20, 20, "fonts/calibrib30" ],
"wind": [ 90, 83, "fonts/calibrib60" ],
"temp": [ 20, 170, "fonts/calibrib150" ],
"icon": [ 385, 0, 100, 2 ],
"dir": [ 40, 50, 80 ],
"umbrella": [ 325, 155, 78 ]
},
"8": {
"location": [ 10, 10, "fonts/calibrib30" ],
"column": [ 6, 66 ],
"day": [ 33, 60, "fonts/bahnschrift20", 104, 230 ],
"rain": [ 34, 260 ],
"icon": [ 32, 145, 30 ],
"wind": [ 17, 90 ],
"line": [ 50, 300 ]
},
"9": {
"title": [ 10, 10, "fonts/calibrib30" ],
"items": 12,
"line": [ 10, 60, 20 ],
"font": "7x14_tf"
},
"10": {
"title": [ 10, 10, "fonts/bahnschrift20" ],
"pos": [ 200, 30 ]
},
"11": {
"title": [ 10, 10, "fonts/bahnschrift30" ],
"date": [ 390, 10 ],
"items": 12,
"red": [ 0, 48, 400, 17 ],
"line": [ 10, 61, 18, "7x14_tf", 60 ]
}
}
}
60 changes: 60 additions & 0 deletions ESP32_AP-Flasher/data/tagtypes/05.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "ST‐GR750BN 7.4\"",
"width": 640,
"height": 384,
"rotatebuffer": 0,
"bpp": 2,
"colors": 3,
"colortable": {
"white": [255, 255, 255],
"black": [0, 0, 0],
"red": [255, 0, 0],
"gray": [150, 150, 150]
},
"capabilities": ["button", "customlut"],
"template": {
"1": {
"weekday": [ 200, 25, "fonts/calibrib60" ],
"month": [ 200, 225, "fonts/calibrib60" ],
"day": [ 200, 95, "fonts/calibrib150" ]
},
"2": {
"fonts": [ "fonts/calibrib150", "fonts/calibrib150", "fonts/calibrib150", "fonts/calibrib120" ],
"xy": [ 200, 148 ]
},
"4": {
"location": [ 20, 20, "fonts/calibrib30" ],
"wind": [ 90, 83, "fonts/calibrib60" ],
"temp": [ 20, 170, "fonts/calibrib150" ],
"icon": [ 385, 0, 100, 2 ],
"dir": [ 40, 50, 80 ],
"umbrella": [ 325, 155, 78 ]
},
"8": {
"location": [ 10, 10, "fonts/calibrib30" ],
"column": [ 6, 66 ],
"day": [ 33, 60, "fonts/bahnschrift20", 104, 230 ],
"rain": [ 34, 260 ],
"icon": [ 32, 145, 30 ],
"wind": [ 17, 90 ],
"line": [ 50, 300 ]
},
"9": {
"title": [ 10, 10, "fonts/calibrib30" ],
"items": 12,
"line": [ 10, 60, 20 ],
"font": "7x14_tf"
},
"10": {
"title": [ 10, 10, "fonts/bahnschrift20" ],
"pos": [ 200, 30 ]
},
"11": {
"title": [ 10, 10, "fonts/bahnschrift30" ],
"date": [ 390, 10 ],
"items": 12,
"red": [ 0, 48, 400, 17 ],
"line": [ 10, 61, 18, "7x14_tf", 60 ]
}
}
}
16 changes: 16 additions & 0 deletions ESP32_AP-Flasher/data/tagtypes/11.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "ST-GR2900L 2.9\" (UC8151)",
"width": 296,
"height": 128,
"rotatebuffer": 1,
"bpp": 2,
"colors": 3,
"colortable": {
"white": [255, 255, 255],
"black": [0, 0, 0],
"red": [255, 0, 0],
"gray": [150, 150, 150]
},
"capabilities": ["button", "customlut"],
"usetemplate": 1
}
12 changes: 12 additions & 0 deletions ESP32_AP-Flasher/data/tagtypes/F0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "SLT‐EM007 Segmented",
"width": 0,
"height": 0,
"rotatebuffer": 0,
"bpp": 1,
"colors": 0,
"colortable": {},
"capabilities": [],
"template": {
}
}
Binary file modified ESP32_AP-Flasher/data/www/content_cards.json.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/edit.html.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/index.html.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/main.css.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/main.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion ESP32_AP-Flasher/include/contentmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ void getLocation(JsonObject &cfgobj);
void prepareNFCReq(uint8_t* dst, const char* url);
void prepareLUTreq(uint8_t *dst, String input);
void prepareConfigFile(uint8_t *dst, JsonObject config);
void getTemplate(JsonDocument &json, const char *filePath, uint8_t id, uint8_t hwtype);
void getTemplate(JsonDocument &json, uint8_t id, uint8_t hwtype);
void setU8G2Font(const String &title, U8g2_for_TFT_eSPI &u8f);
void showIpAddress(String dst);

0 comments on commit 09f7466

Please sign in to comment.