#ifndef DISPLAY_H
#define DISPLAY_H
#include <SSD1306Wire.h>

#define DISPLAY_BUFFER_SIZE 30

class Display
{
private:
    SSD1306Wire *display;
    int readerid;
    char ReaderInfo[DISPLAY_BUFFER_SIZE];
    char Title[DISPLAY_BUFFER_SIZE];
    char Info[DISPLAY_BUFFER_SIZE];

public:
    Display(int sda, int scl, int readerid);
    void createReaderInfo(const char *state);
    void clearReaderInfo();
    void writeReaderInfo(const char *text);
    void writeTitle(const char *text);
    void writeInfo(const char *text);
    void updateDisplay();
    void updateByMQTT(const char *topic, byte *payload, unsigned int length);
};
#endif