Skip to content

Commit 46aefd1

Browse files
committed
forecast tab and multiple fixes
1 parent 955f1b4 commit 46aefd1

File tree

15 files changed

+358
-417
lines changed

15 files changed

+358
-417
lines changed

images/condition/unknown.png

517 Bytes
Loading

images/condition/wind-deg.png

-631 Bytes
Binary file not shown.

images/sensor/direction.png

248 Bytes
Loading

images/sensor/sunlen.png

326 Bytes
Loading

images/sensor/sunrise.png

620 Bytes
Loading

images/sensor/sunset.png

467 Bytes
Loading

images/sensor/thermo2.png

356 Bytes
Loading

images/sensor/wind-deg.png

291 Bytes
Loading

index.py

Lines changed: 43 additions & 287 deletions
Large diffs are not rendered by default.

pages/__init__.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import lvgl as lv
2+
from lib.imagetools import get_png_info, open_png
3+
import gc
4+
5+
class pageBase():
6+
def __init__(self):
7+
gc.collect()
8+
decoder = lv.img.decoder_create()
9+
decoder.info_cb = get_png_info
10+
decoder.open_cb = open_png
11+
gc.collect()
12+
13+
def get_img(self, path):
14+
gc.collect()
15+
with open(path ,'rb') as f:
16+
png_data = f.read()
17+
return lv.img_dsc_t({
18+
'data_size': len(png_data),
19+
'data': png_data
20+
})

0 commit comments

Comments
 (0)