Skip to content

Commit

Permalink
add dayahead prices to 4.2" displays; add custom interval to weather
Browse files Browse the repository at this point in the history
don't forget to reboot the AP and clear browser cache after updating (or to open your browser developer tools and check 'disable cache' the first time you reload the UI)
  • Loading branch information
nlimper committed Oct 25, 2024
1 parent 3f61340 commit dd5d96d
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 56 deletions.
Binary file modified ESP32_AP-Flasher/data/www/content_cards.json.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions ESP32_AP-Flasher/src/contentmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ void drawNew(const uint8_t mac[8], tagRecord *&taginfo) {
// https://github.com/erikflowers/weather-icons

drawWeather(filename, cfgobj, taginfo, imageParams);
taginfo->nextupdate = now + 1800;
updateTagImage(filename, mac, 15, taginfo, imageParams);
taginfo->nextupdate = now + interval;
updateTagImage(filename, mac, interval / 60, taginfo, imageParams);
break;

case 8: // Forecast
Expand Down
11 changes: 11 additions & 0 deletions ESP32_AP-Flasher/wwwroot/content_cards.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@
"1": "Fahrenheit / mph / inches"
}
},
{
"key": "interval",
"name": "Interval",
"desc": "How often the info is being refreshed.",
"type": "select",
"options": {
"30": "-Every 30 minutes",
"60": "Every hour",
"180": "Every three hours"
}
},
{
"key": "#lat",
"name": "Lat",
Expand Down
10 changes: 8 additions & 2 deletions resources/tagtypes/02.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"name": "M2 4.2\"",
"width": 400,
"height": 300,
Expand All @@ -12,7 +12,7 @@
},
"shortlut": 1,
"options": [ "button" ],
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20 ],
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20, 27 ],
"template": {
"1": {
"weekday": [ 200, 0, "Signika-SB.ttf", 70 ],
Expand Down Expand Up @@ -51,6 +51,12 @@
"mode": 1,
"days": 4,
"gridparam": [ 5, 17, 20, "calibrib16.vlw", "tahoma9.vlw", 14 ]
},
"27": {
"bars": [ 15, 385, 240, 20 ],
"time": [ "calibrib16.vlw" ],
"yaxis": [ "tahoma9.vlw", 3, 6 ],
"head": [ "calibrib30.vlw" ]
}
}
}
4 changes: 2 additions & 2 deletions resources/tagtypes/05.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"name": "M2 7.4\"",
"width": 640,
"height": 384,
Expand Down Expand Up @@ -54,7 +54,7 @@
"gridparam": [ 3, 17, 30, "calibrib16.vlw", "tahoma9.vlw", 14 ]
},
"27": {
"bars": [ 12, 630, 340, 20 ],
"bars": [ 18, 612, 350, 20 ],
"time": [ "calibrib16.vlw" ],
"yaxis": [ "calibrib16.vlw", 1, 12 ],
"head": [ "calibrib30.vlw" ]
Expand Down
45 changes: 3 additions & 42 deletions resources/tagtypes/12.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"name": "M2 4.2\" UC",
"width": 400,
"height": 300,
Expand All @@ -12,45 +12,6 @@
},
"shortlut": 1,
"options": [ "button" ],
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20 ],
"template": {
"1": {
"weekday": [ 200, 0, "Signika-SB.ttf", 70 ],
"month": [ 200, 210, "Signika-SB.ttf", 70 ],
"day": [ 200, 45, "Signika-SB.ttf", 170 ]
},
"4": {
"location": [ 20, 20, "fonts/calibrib30" ],
"wind": [ 90, 83, "fonts/calibrib50" ],
"temp": [ 20, 170, "fonts/calibrib100" ],
"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": [ 6, 0, "Signika-SB.ttf", 25 ],
"items": 4,
"line": [ 9, 40, "calibrib16.vlw" ],
"desc": [ 2, 8, "REFSAN12.vlw", 1.2 ]
},
"10": {
"title": [ 200, 10, "fonts/bahnschrift20" ],
"pos": [ 200, 35 ]
},
"11": {
"rotate": 0,
"mode": 1,
"days": 4,
"gridparam": [ 5, 17, 20, "calibrib16.vlw", "tahoma9.vlw", 14 ]
}
}
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20, 27 ],
"usetemplate": 2
}
4 changes: 2 additions & 2 deletions resources/tagtypes/34.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"name": "M3 4.2\"",
"width": 400,
"height": 300,
Expand All @@ -13,6 +13,6 @@
"shortlut": 0,
"zlib_compression": "27",
"options": [ "button", "led" ],
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20 ],
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20, 27 ],
"usetemplate": 2
}
4 changes: 2 additions & 2 deletions resources/tagtypes/3C.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"name": "M3 4.2\" BWY",
"width": 400,
"height": 300,
Expand All @@ -13,6 +13,6 @@
"shortlut": 0,
"zlib_compression": "27",
"options": [ "button", "led" ],
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20 ],
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20, 27 ],
"usetemplate": 2
}
4 changes: 2 additions & 2 deletions resources/tagtypes/83.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"name": "Chroma42 4.2\"",
"width": 400,
"height": 300,
Expand All @@ -11,6 +11,6 @@
"red": [255, 0, 0]
},
"shortlut": 0,
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20 ],
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20, 27 ],
"usetemplate": 2
}
4 changes: 2 additions & 2 deletions resources/tagtypes/B5.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"name": "Gicisky BLE EPD BWR 4.2\"",
"width": 400,
"height": 300,
Expand All @@ -10,6 +10,6 @@
"black": [ 0, 0, 0 ],
"red": [ 255, 0, 0 ]
},
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20 ],
"contentids": [ 22, 23, 1, 4, 5, 7, 8, 9, 10, 11, 17, 18, 19, 20, 27 ],
"usetemplate": 2
}

0 comments on commit dd5d96d

Please sign in to comment.