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-07 16:39:01 +07:00
|
|
|
class OledDisplay : public PrintLog {
|
2024-04-03 11:40:46 +07:00
|
|
|
private:
|
2024-04-07 16:39:01 +07:00
|
|
|
Configuration &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;
|
2024-04-07 16:39:01 +07:00
|
|
|
Measurements &value;
|
2024-04-03 21:26:04 +07:00
|
|
|
|
2024-04-04 18:35:15 +07:00
|
|
|
void showTempHum(bool hasStatus);
|
2024-04-03 11:40:46 +07:00
|
|
|
public:
|
2024-04-07 16:39:01 +07:00
|
|
|
OledDisplay(Configuration &config, Measurements &value,
|
2024-04-03 21:26:04 +07:00
|
|
|
Stream &log);
|
2024-04-07 16:39:01 +07:00
|
|
|
~OledDisplay();
|
2024-04-03 11:40:46 +07:00
|
|
|
|
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);
|
|
|
|
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(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-25 06:49:14 +07:00
|
|
|
void showWiFiQrCode(String content, String label);
|
2024-04-03 11:40:46 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /** _AG_OLED_DISPLAY_H_ */
|