-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathscreen.h
49 lines (42 loc) · 1.27 KB
/
screen.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
42
43
44
45
46
47
48
49
#ifndef SCREEN
#define SCREEN
#include "userBoardDefines.h"
#ifdef M5STACK
#include <M5StickCPlus.h>
#endif
#ifdef GENERIC_ESP32
#include <Arduino.h>
#include <SPI.h>
#include <TFT_eSPI.h>
#endif
#include "blockClockTypes.h"
#include "blockClockUtils.h"
class Screen {
private:
TFT_eSPI *lcd;
TFT_eSprite *sprite;
public:
explicit Screen();
void initScreen();
void drawStringPush(String value, int32_t x, int32_t y, uint8_t size);
void drawString(String value, int32_t x, int32_t y, uint8_t size);
void clearScreen();
void clearSprite();
void drawBlockHeightScreen(String blockheight);
void drawRecommendedFeesScreen(RecommendedFees recommendedFees);
void drawnPriceScreen(PriceData priceData);
void drawnChangeScreen(PriceData priceData);
void drawnDateAndTimeScreen(String hours, String minutes, String ddmmyyyy);
void printChange(String time, float change, int16_t x, int16_t y);
void printFee(String text, uint16_t fee, int16_t x, int16_t y);
void drawnWiFiDataScreen(WiFiData wifiData);
void printBattery(int batteryLevel);
void clearBatterySprite();
void clearBatteryScreen();
void clearScreenExceptBattery();
void setBitcoinTextColor(float delta);
void resetTextColor();
void clearHalfScreen();
void clearSpriteExceptBattery();
};
#endif