|
|
@@ -314,12 +314,12 @@ class GxEPD2_BW : public GxEPD2_GFX_BASE_CLASS
|
|
|
// display buffer content to screen, useful for full screen buffer
|
|
|
void display(bool partial_update_mode = false)
|
|
|
{
|
|
|
- if (partial_update_mode) epd2.writeImage(_buffer, 0, 0, WIDTH, _page_height);
|
|
|
- else epd2.writeImageForFullRefresh(_buffer, 0, 0, WIDTH, _page_height);
|
|
|
+ if (partial_update_mode) epd2.writeImage(_buffer, 0, 0, GxEPD2_Type::WIDTH, _page_height);
|
|
|
+ else epd2.writeImageForFullRefresh(_buffer, 0, 0, GxEPD2_Type::WIDTH, _page_height);
|
|
|
epd2.refresh(partial_update_mode);
|
|
|
if (epd2.hasFastPartialUpdate)
|
|
|
{
|
|
|
- epd2.writeImageAgain(_buffer, 0, 0, WIDTH, _page_height);
|
|
|
+ epd2.writeImageAgain(_buffer, 0, 0, GxEPD2_Type::WIDTH, _page_height);
|
|
|
}
|
|
|
if (!partial_update_mode) epd2.powerOff();
|
|
|
}
|
|
|
@@ -338,11 +338,11 @@ class GxEPD2_BW : public GxEPD2_GFX_BASE_CLASS
|
|
|
h = gx_uint16_min(h, height() - y);
|
|
|
_rotate(x, y, w, h);
|
|
|
uint16_t y_part = _reverse ? HEIGHT - h - y : y;
|
|
|
- epd2.writeImagePart(_buffer, x, y_part, WIDTH, _page_height, x, y, w, h);
|
|
|
+ epd2.writeImagePart(_buffer, x, y_part, GxEPD2_Type::WIDTH, _page_height, x, y, w, h);
|
|
|
epd2.refresh(x, y, w, h);
|
|
|
if (epd2.hasFastPartialUpdate)
|
|
|
{
|
|
|
- epd2.writeImagePartAgain(_buffer, x, y_part, WIDTH, _page_height, x, y, w, h);
|
|
|
+ epd2.writeImagePartAgain(_buffer, x, y_part, GxEPD2_Type::WIDTH, _page_height, x, y, w, h);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -351,7 +351,7 @@ class GxEPD2_BW : public GxEPD2_GFX_BASE_CLASS
|
|
|
_using_partial_mode = false;
|
|
|
_pw_x = 0;
|
|
|
_pw_y = 0;
|
|
|
- _pw_w = WIDTH;
|
|
|
+ _pw_w = GxEPD2_Type::WIDTH;
|
|
|
_pw_h = HEIGHT;
|
|
|
}
|
|
|
|
|
|
@@ -398,11 +398,11 @@ class GxEPD2_BW : public GxEPD2_GFX_BASE_CLASS
|
|
|
}
|
|
|
else // full update
|
|
|
{
|
|
|
- epd2.writeImageForFullRefresh(_buffer, 0, 0, WIDTH, HEIGHT);
|
|
|
+ epd2.writeImageForFullRefresh(_buffer, 0, 0, GxEPD2_Type::WIDTH, HEIGHT);
|
|
|
epd2.refresh(false);
|
|
|
if (epd2.hasFastPartialUpdate)
|
|
|
{
|
|
|
- epd2.writeImageAgain(_buffer, 0, 0, WIDTH, HEIGHT);
|
|
|
+ epd2.writeImageAgain(_buffer, 0, 0, GxEPD2_Type::WIDTH, HEIGHT);
|
|
|
//epd2.refresh(true); // not needed
|
|
|
}
|
|
|
epd2.powerOff();
|
|
|
@@ -452,8 +452,8 @@ class GxEPD2_BW : public GxEPD2_GFX_BASE_CLASS
|
|
|
}
|
|
|
else // full update
|
|
|
{
|
|
|
- if (!_second_phase) epd2.writeImageForFullRefresh(_buffer, 0, page_ys, WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
|
|
|
- else epd2.writeImageAgain(_buffer, 0, page_ys, WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
|
|
|
+ if (!_second_phase) epd2.writeImageForFullRefresh(_buffer, 0, page_ys, GxEPD2_Type::WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
|
|
|
+ else epd2.writeImageAgain(_buffer, 0, page_ys, GxEPD2_Type::WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
|
|
|
_current_page++;
|
|
|
if (_current_page == int16_t(_pages))
|
|
|
{
|
|
|
@@ -497,11 +497,11 @@ class GxEPD2_BW : public GxEPD2_GFX_BASE_CLASS
|
|
|
}
|
|
|
else // full update
|
|
|
{
|
|
|
- epd2.writeImageForFullRefresh(_buffer, 0, 0, WIDTH, HEIGHT);
|
|
|
+ epd2.writeImageForFullRefresh(_buffer, 0, 0, GxEPD2_Type::WIDTH, HEIGHT);
|
|
|
epd2.refresh(false);
|
|
|
if (epd2.hasFastPartialUpdate)
|
|
|
{
|
|
|
- epd2.writeImageAgain(_buffer, 0, 0, WIDTH, HEIGHT);
|
|
|
+ epd2.writeImageAgain(_buffer, 0, 0, GxEPD2_Type::WIDTH, HEIGHT);
|
|
|
//epd2.refresh(true); // not needed
|
|
|
epd2.powerOff();
|
|
|
}
|
|
|
@@ -539,7 +539,7 @@ class GxEPD2_BW : public GxEPD2_GFX_BASE_CLASS
|
|
|
uint16_t page_ys = _current_page * _page_height;
|
|
|
fillScreen(GxEPD_WHITE);
|
|
|
drawCallback(pv);
|
|
|
- epd2.writeImageForFullRefresh(_buffer, 0, page_ys, WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
|
|
|
+ epd2.writeImageForFullRefresh(_buffer, 0, page_ys, GxEPD2_Type::WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
|
|
|
}
|
|
|
epd2.refresh(false); // full update after first phase
|
|
|
if (epd2.hasFastPartialUpdate)
|
|
|
@@ -550,7 +550,7 @@ class GxEPD2_BW : public GxEPD2_GFX_BASE_CLASS
|
|
|
uint16_t page_ys = _current_page * _page_height;
|
|
|
fillScreen(GxEPD_WHITE);
|
|
|
drawCallback(pv);
|
|
|
- epd2.writeImageAgain(_buffer, 0, page_ys, WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
|
|
|
+ epd2.writeImageAgain(_buffer, 0, page_ys, GxEPD2_Type::WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
|
|
|
}
|
|
|
//epd2.refresh(true); // partial update after second phase // not needed
|
|
|
}
|