forked from wuspy/portal_calendar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Display.h
41 lines (36 loc) · 1.29 KB
/
Display.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "Arduino.h"
#include "DisplayGDEW075T7.h"
#include "resources/image.h"
#include "global.h"
#include "weather.h"
#include "localization.h"
#ifndef PORTALCALENDAR_DISPLAY_H
#define PORTALCALENDAR_DISPLAY_H
class DisplayClass
{
public:
~DisplayClass();
void error(String message, bool willRetry);
void update(const tm *now, const Locale& locale, bool showWeather);
void showWelcomeScreen();
void showConfigServerScreen(String ssid, String password, String hostname, String connectedWifiName);
#ifdef DEV_WEBSERVER
void showDevWebserverScreen(String ssid, IPAddress localIp);
#endif
#ifdef DEBUG
void testChamberIcons();
#endif
private:
void init();
const Image* getWeatherConditionIcon(WeatherCondition condition, bool day);
void drawWeatherInfoText(const char* text, const Image* symbol, int32_t x, int32_t y);
void drawDailyWeather(const DailyWeather& weather, int32_t x, const Locale& locale);
void drawWeatherEntry(const WeatherEntry& weather, int32_t x);
void drawChamberIcon(const Image& icon, int32_t x, int32_t y);
void drawStandardSeparators();
void drawChamberNumber(int number, int total);
void drawApertureLogo();
DisplayGDEW075T7 *_display = nullptr;
};
extern DisplayClass Display;
#endif // PORTALCALENDAR_DISPLAY_H