mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2026-01-04 11:53:39 +01:00
Display init zum Zweiten
chango to full Buffer Mode, remove picture loop, because it's not worked. look: https://github.com/olikraus/u8glib/wiki/tpictureloop snprintf + public vars - dispPowerSafe => true: PowerSafe Mode on - dispLogo => true: showing Logo upper right corner - dispContrast => possible to adjust the Display Contrast change in date time, buffer deleted Display-Constructor changed, reset goes to front Arrow and Logo only shown, when production is on Refactor OLEDDisplayClass to DisplayGraphicClass
This commit is contained in:
41
include/Display_Graphic.h
Normal file
41
include/Display_Graphic.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef Display_Graphic_H
|
||||
#define Display_Graphic_H
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Hoymiles.h>
|
||||
#include <NetworkSettings.h>
|
||||
#include <U8g2lib.h>
|
||||
#include <map>
|
||||
#include <time.h>
|
||||
|
||||
class DisplayGraphicClass {
|
||||
public:
|
||||
DisplayGraphicClass();
|
||||
~DisplayGraphicClass();
|
||||
|
||||
void init(uint8_t type);
|
||||
void loop();
|
||||
|
||||
bool dispPowerSafe = true;
|
||||
bool dispLogo = true;
|
||||
uint8_t dispContrast = 60;
|
||||
|
||||
private:
|
||||
void printText(const char* text, uint8_t line);
|
||||
|
||||
U8G2* _display;
|
||||
|
||||
uint8_t _mExtra;
|
||||
uint8_t _display_type = 0;
|
||||
uint16_t _dispX = 0;
|
||||
uint16_t _dispY = 0;
|
||||
uint16_t _period = 1000;
|
||||
uint16_t _interval = 60000; // interval at which to power save (milliseconds)
|
||||
uint32_t _lastPublish = 0;
|
||||
uint32_t _previousMillis = 0;
|
||||
char _fmtText[32];
|
||||
};
|
||||
|
||||
extern DisplayGraphicClass Display;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user