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 # 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. # 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 night = 1
else: else:
night = 0 night = 0

View File

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