Skip to content

Commit bcf810d

Browse files
committed
Adding back forced partial.
1 parent e00fcbb commit bcf810d

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

src/Inkplate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Inkplate : public System, public Graphics
4141
void clearDisplay();
4242
void display();
4343
// void writeRow(uint8_t data);
44-
void partialUpdate();
44+
void partialUpdate(bool _forced = false);
4545

4646
#ifdef ARDUINO_INKPLATECOLOR
4747
void clean();

src/boards/Inkplate10.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,11 @@ void IRAM_ATTR Inkplate::display3b()
234234
einkOff();
235235
}
236236

237-
void Inkplate::partialUpdate()
237+
void Inkplate::partialUpdate(bool _forced)
238238
{
239239
if (getDisplayMode() == 1)
240240
return;
241-
if (_blockPartial == 1)
241+
if (_blockPartial == 1 && !_forced)
242242
{
243243
display1b();
244244
return;

src/boards/Inkplate5.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,11 @@ void IRAM_ATTR Inkplate::display3b()
265265
einkOff();
266266
}
267267

268-
void Inkplate::partialUpdate()
268+
void Inkplate::partialUpdate(bool _forced)
269269
{
270270
if (getDisplayMode() == 1)
271271
return;
272-
if (_blockPartial == 1)
272+
if (_blockPartial == 1 && !_forced)
273273
{
274274
display1b();
275275
return;

src/boards/Inkplate6.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,11 @@ void Inkplate::display3b()
281281
einkOff();
282282
}
283283

284-
void Inkplate::partialUpdate()
284+
void Inkplate::partialUpdate(bool _forced)
285285
{
286286
if (getDisplayMode() == 1)
287287
return;
288-
if (_blockPartial == 1)
288+
if (_blockPartial == 1 && !_forced)
289289
{
290290
display1b();
291291
return;

src/boards/Inkplate6plus.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,15 +337,16 @@ void Inkplate::display3b()
337337
// vscan_end();
338338
// }
339339

340-
void Inkplate::partialUpdate()
340+
void Inkplate::partialUpdate(bool _forced)
341341
{
342342
if (getDisplayMode() == 1)
343343
return;
344-
if (_blockPartial == 1)
344+
if (_blockPartial == 1 && !_forced)
345345
{
346346
display1b();
347347
return;
348348
}
349+
349350
uint32_t _pos = (E_INK_WIDTH * E_INK_HEIGHT / 8) - 1;
350351
uint32_t _send;
351352
uint8_t data;

test/partial/partial.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void loop()
1515
for (int i = 0; i < 600 / 50; ++i)
1616
for (int j = 0; j < 800 / 50; ++j)
1717
display.fillRect(j * 50, i * 50, 50, 50, (i + j + k % 2) & 1);
18-
display.partialUpdate(0, 100, 800, 200);
18+
display.partialUpdate();
1919
++k;
2020
if (k % 2 == 0)
2121
display.display();

0 commit comments

Comments
 (0)