mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-25 23:06:11 +02:00
Versuch die WebOberfläche an zu passen
This commit is contained in:
parent
3a2e2fa286
commit
18ea8b5925
4 changed files with 5 additions and 6 deletions
|
@ -11,7 +11,7 @@ SPIClass hspi(HSPI);
|
|||
|
||||
std::map<uint8_t, std::function<GxEPD2_GFX*(uint8_t, uint8_t, uint8_t, uint8_t)>> _ePaperTypes = {
|
||||
// DEPG0150BN 200x200, SSD1681, TTGO T5 V2.4.1
|
||||
{4, [](uint8_t _CS, uint8_t _DC, uint8_t _RST, uint8_t _BUSY) { return new GxEPD2_BW<GxEPD2_150_BN, GxEPD2_150_BN::HEIGHT>(GxEPD2_150_BN(_CS, _DC, _RST, _BUSY)); }},
|
||||
{11, [](uint8_t _CS, uint8_t _DC, uint8_t _RST, uint8_t _BUSY) { return new GxEPD2_BW<GxEPD2_150_BN, GxEPD2_150_BN::HEIGHT>(GxEPD2_150_BN(_CS, _DC, _RST, _BUSY)); }},
|
||||
// GDEW027C44 2.7 " b/w/r 176x264, IL91874
|
||||
//{DisplayType_t::ePaper270, [](uint8_t _CS, uint8_t _DC, uint8_t _RST, uint8_t _BUSY)
|
||||
// F { return new GxEPD2_3C<GxEPD2_270c, GxEPD2_270c::HEIGHT>(GxEPD2_270c(_CS, _DC, _RST, _BUSY)); }},
|
||||
|
@ -66,7 +66,8 @@ void DisplayEPaperClass::fullRefresh() {
|
|||
delay(2000);
|
||||
// screen complete white
|
||||
_display->fillScreen(GxEPD_WHITE);
|
||||
while (_display->nextPage());
|
||||
while (_display->nextPage())
|
||||
;
|
||||
}
|
||||
//***************************************************************************
|
||||
void DisplayEPaperClass::headlineIP() {
|
||||
|
|
|
@ -26,7 +26,7 @@ class MonochromeDisplay {
|
|||
|
||||
if (mCfg->type == 0) {
|
||||
return;
|
||||
} else if (1 < mCfg->type < 4) {
|
||||
} else if (1 < mCfg->type < 10) {
|
||||
switch (mCfg->rot) {
|
||||
case 0:
|
||||
DisplayMono.disp_rotation = U8G2_R0;
|
||||
|
@ -47,7 +47,7 @@ class MonochromeDisplay {
|
|||
DisplayMono.contrast = mCfg->contrast;
|
||||
|
||||
DisplayMono.init(mCfg->type, mCfg->disp_cs, mCfg->disp_dc, mCfg->disp_reset, mCfg->disp_busy, mCfg->disp_clk, mCfg->disp_data);
|
||||
} else if (mCfg->type == 4) {
|
||||
} else if (mCfg->type > 10) {
|
||||
DisplayEPaper.displayRotation = mCfg->rot;
|
||||
counterEPaper = 0;
|
||||
|
||||
|
|
|
@ -431,7 +431,6 @@ class RestApi {
|
|||
void getDisplay(JsonObject obj) {
|
||||
obj[F("disp_type")] = (uint8_t)mConfig->plugin.display.type;
|
||||
obj[F("disp_pwr")] = (bool)mConfig->plugin.display.pwrSaveAtIvOffline;
|
||||
obj[F("logo_en")] = (bool)mConfig->plugin.display.logoEn;
|
||||
obj[F("px_shift")] = (bool)mConfig->plugin.display.pxShift;
|
||||
obj[F("rotation")] = (uint8_t)mConfig->plugin.display.rot;
|
||||
obj[F("contrast")] = (uint8_t)mConfig->plugin.display.contrast;
|
||||
|
|
|
@ -602,7 +602,6 @@ class Web {
|
|||
|
||||
// display
|
||||
mConfig->plugin.display.pwrSaveAtIvOffline = (request->arg("dispPwr") == "on");
|
||||
mConfig->plugin.display.logoEn = (request->arg("logoEn") == "on");
|
||||
mConfig->plugin.display.pxShift = (request->arg("dispPxSh") == "on");
|
||||
mConfig->plugin.display.rot = request->arg("rotation").toInt();
|
||||
mConfig->plugin.display.type = request->arg("dispType").toInt();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue