add dayahead prices to 4.2" displays; add custom interval to weather

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)
This commit is contained in:
Nic Limper
2024-10-25 16:20:38 +02:00
parent 3f613407fe
commit dd5d96d1ee
10 changed files with 34 additions and 56 deletions

View File

@@ -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

View File

@@ -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",

View File

@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"name": "M2 4.2\"",
"width": 400,
"height": 300,
@@ -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 ],
@@ -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" ]
}
}
}

View File

@@ -1,5 +1,5 @@
{
"version": 2,
"version": 3,
"name": "M2 7.4\"",
"width": 640,
"height": 384,
@@ -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" ]

View File

@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"name": "M2 4.2\" UC",
"width": 400,
"height": 300,
@@ -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
}

View File

@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"name": "M3 4.2\"",
"width": 400,
"height": 300,
@@ -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
}

View File

@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"name": "M3 4.2\" BWY",
"width": 400,
"height": 300,
@@ -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
}

View File

@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"name": "Chroma42 4.2\"",
"width": 400,
"height": 300,
@@ -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
}

View File

@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"name": "Gicisky BLE EPD BWR 4.2\"",
"width": 400,
"height": 300,
@@ -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
}