| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- /*
- * Display.h
- *
- * Wrapper class for Adafruit OLED display.
- *
- * Created on: 05.01.2026
- * Author: FSmilari
- */
-
- #ifndef DISPLAY_H_
- #define DISPLAY_H_
-
- #include <Adafruit_ST7735.h>
- #include "images/SFToolsLogo.h"
- #include "Status.h"
-
- #define SCREEN_WIDTH 160
- #define SCREEN_HEIGHT 128
- #define SCREEN_ADDRESS 0x3C
-
- class Display {
- private:
- Adafruit_ST7735 tft; // @suppress("Abstract class cannot be instantiated")
- String configText;
- String configOption;
- float configValue;
- String configUnit;
- bool refreshScreen;
- int angle;
- unsigned long starttime;
-
- void drawBitmap(int x, int y, int w, int h, const uint8_t bitmap[], uint16_t col);
- void drawRGBBitmap(int x, int y, int w, int h, const uint16_t bitmap[]);
- void redrawFrame();
-
- public:
- Display();
- void init(void);
- void display(void);
- void clearDisplay(void);
- void showBrand(int16_t x, int16_t y);
- void showInitialization(void);
- void showFrame(Status status);
- void drawXCenteredText(String txt, const GFXfont *font, uint8_t s, uint16_t c, int16_t y);
- void drawText(String txt, const GFXfont *font, uint8_t s, uint16_t c, int16_t x, int16_t y);
-
- };
-
- #endif /* DISPLAY_H_ */
|