mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-23 13:56:10 +02:00
Ordner MonochromeDisplay auf Display umbenannt
This commit is contained in:
parent
f1b722fd5d
commit
3a2e2fa286
8 changed files with 1 additions and 1 deletions
51
src/plugins/Display/Display_ePaper.h
Normal file
51
src/plugins/Display/Display_ePaper.h
Normal file
|
@ -0,0 +1,51 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
// uncomment next line to use HSPI for EPD (and VSPI for SD), e.g. with Waveshare ESP32 Driver Board
|
||||
#define USE_HSPI_FOR_EPD
|
||||
|
||||
/// uncomment next line to use class GFX of library GFX_Root instead of Adafruit_GFX, to use less code and ram
|
||||
// #include <GFX.h>
|
||||
// base class GxEPD2_GFX can be used to pass references or pointers to the display instance as parameter, uses ~1.2k more code
|
||||
// enable GxEPD2_GFX base class
|
||||
#define ENABLE_GxEPD2_GFX 1
|
||||
|
||||
#include <GxEPD2_3C.h>
|
||||
#include <GxEPD2_BW.h>
|
||||
#include <SPI.h>
|
||||
|
||||
#include <map>
|
||||
// FreeFonts from Adafruit_GFX
|
||||
#include <Fonts/FreeSans12pt7b.h>
|
||||
#include <Fonts/FreeSans18pt7b.h>
|
||||
#include <Fonts/FreeSans24pt7b.h>
|
||||
#include <Fonts/FreeSans9pt7b.h>
|
||||
|
||||
#include "imagedata.h"
|
||||
|
||||
// GDEW027C44 2.7 " b/w/r 176x264, IL91874
|
||||
// GDEH0154D67 1.54" b/w 200x200
|
||||
|
||||
class DisplayEPaperClass {
|
||||
public:
|
||||
DisplayEPaperClass();
|
||||
~DisplayEPaperClass();
|
||||
void fullRefresh();
|
||||
void init(uint8_t type, uint8_t _CS, uint8_t _DC, uint8_t _RST, uint8_t _BUSY, uint8_t _SCK, uint8_t _MOSI);
|
||||
void loop(float totalPower, float totalYieldDay, float totalYieldTotal, uint8_t isprod);
|
||||
|
||||
uint8_t displayRotation = 2;
|
||||
|
||||
private:
|
||||
void headlineIP();
|
||||
void actualPowerPaged(float _totalPower, float _totalYieldDay, float _totalYieldTotal, uint8_t _isprod);
|
||||
void lastUpdatePaged();
|
||||
|
||||
bool _changed = false;
|
||||
char _fmtText[35];
|
||||
const char* _settedIP;
|
||||
uint8_t headfootline = 16;
|
||||
GxEPD2_GFX* _display;
|
||||
};
|
||||
|
||||
extern DisplayEPaperClass DisplayEPaper;
|
Loading…
Add table
Add a link
Reference in a new issue