Adjust weather image placement

This commit is contained in:
Paul Warren 2019-12-01 19:18:20 +11:00
parent cc126550f2
commit d4d376f23e
2 changed files with 13 additions and 11 deletions

View File

@ -47,7 +47,7 @@ weather = {}
# The first forecast period doesn't always have the temperature and other bits
# I get the overnight low and forecast to substitute when this happens.
if (type(belco['forecast-period'][0]) == type(collections.OrderedDict())):
if (type(belco['forecast-period'][0]['element']) == type(collections.OrderedDict())):
night = 1
else:
night = 0

View File

@ -269,28 +269,30 @@ void weatherUpdate(void) {
epd_set_en_font(ASCII64);
//Today
epd_disp_bitmap(today_icon, 0, 290);
wait();
epd_disp_string(today_day, 0, 536);
wait();
epd_disp_string(today_max, 20, 422);
wait();
epd_disp_bitmap(today_icon, 0, 318);
epd_disp_string(today_max, 75, 460);
wait();
//Tomorrow
epd_disp_string(tomorrow_day, 267, 536);
epd_disp_bitmap(tomorrow_icon, 267, 290);
wait();
epd_disp_string(tomorrow_max, 297, 422);
epd_disp_string(tomorrow_day, 260, 536);
wait();
epd_disp_bitmap(tomorrow_icon, 267, 318);
epd_disp_string(tomorrow_max, 352, 460);
wait();
//Day After
epd_disp_bitmap(day_after_icon, 533, 290);
wait();
epd_disp_string(day_after_day, 533, 536);
wait();
epd_disp_string(day_after_max, 563, 422);
wait();
epd_disp_bitmap(day_after_icon, 533, 318);
epd_disp_string(day_after_max, 615, 460);
wait();
} else {
Serial.print("Error on HTTP Request: ");