Files
arduino/src/AgOledDisplay.h

41 lines
1.1 KiB
C
Raw Normal View History

2024-04-03 11:40:46 +07:00
#ifndef _AG_OLED_DISPLAY_H_
#define _AG_OLED_DISPLAY_H_
#include "AgConfigure.h"
2024-04-03 21:26:04 +07:00
#include "AgValue.h"
2024-04-03 11:40:46 +07:00
#include "AirGradient.h"
#include "Main/PrintLog.h"
#include <Arduino.h>
2024-04-03 21:26:04 +07:00
class AgOledDisplay : public PrintLog {
2024-04-03 11:40:46 +07:00
private:
AgConfigure &config;
AirGradient &ag;
bool isBegin = false;
2024-04-03 21:26:04 +07:00
void *u8g2 = NULL;
AgValue &value;
void showTempHum(void);
2024-04-03 11:40:46 +07:00
public:
2024-04-03 21:26:04 +07:00
AgOledDisplay(AirGradient &ag, AgConfigure &config, AgValue &value,
Stream &log);
2024-04-03 11:40:46 +07:00
~AgOledDisplay();
bool begin(void);
void end(void);
2024-04-03 21:26:04 +07:00
void setStatus(String &status);
void setStatus(const char *status);
2024-04-03 11:40:46 +07:00
void setText(String &line1, String &line2, String &line3);
2024-04-03 21:26:04 +07:00
void setText(const char *line1, const char *line2, const char *line3);
void setText(const char *text);
2024-04-03 11:40:46 +07:00
void setText(String &text);
2024-04-03 21:26:04 +07:00
void setText(String &line1, String &line2, String &line3, String &line4);
void setText(const char *line1, const char *line2, const char *line3,
const char *line4);
void showDashboard(void);
void showDashboard(const char *status);
2024-04-03 11:40:46 +07:00
};
#endif /** _AG_OLED_DISPLAY_H_ */