Files
arduino/src/AgOledDisplay.h

42 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;
2024-04-04 10:36:59 +07:00
AirGradient *ag;
2024-04-03 11:40:46 +07:00
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-04 10:36:59 +07:00
AgOledDisplay(AgConfigure &config, AgValue &value,
2024-04-03 21:26:04 +07:00
Stream &log);
2024-04-03 11:40:46 +07:00
~AgOledDisplay();
2024-04-04 10:36:59 +07:00
void setAirGradient(AirGradient *ag);
bool begin(void);
2024-04-03 11:40:46 +07:00
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_ */