24 lines
805 B
C++
24 lines
805 B
C++
#pragma once
|
|
#include "Arduino.h"
|
|
#include <U8g2lib.h>
|
|
#include "logos.h"
|
|
#include "utils.h"
|
|
|
|
class OLED {
|
|
private:
|
|
U8G2 u8g2;
|
|
String revision;
|
|
void drawCurvedLineV(int xStart, int yStart, int vert, int horiz);
|
|
void drawCurvedLine(int xStart, int yStart, int horiz, int vert);
|
|
void drawLogoAfraPay();
|
|
void drawLogoBitmap(int width, int height, unsigned char bits[], int yOffset = 0);
|
|
void drawFullScreenText(const String& textTop, const String& textBottom);
|
|
public:
|
|
explicit OLED(U8G2 u8g2);
|
|
void begin();
|
|
void drawLogo(e_logo logo);
|
|
void drawStatusText(const String& status, const String& statusRightAligned = "", bool japan = false);
|
|
void updateOLED(e_state state, const String& statusText, const String& statusTextRightAligned = "", bool japan = false);
|
|
void updateOLED(e_state state);
|
|
};
|