Skip to content

Commit 3097cb9

Browse files
committed
Fixed partialUpdate artifacts+ghosting issues
1 parent e9beb68 commit 3097cb9

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

src/FastEPD.inl

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ int bbepFullUpdate(FASTEPDSTATE *pState, int iClearMode, bool bKeepOn, BBEPRECT
16071607
break;
16081608
}
16091609
bbepClear(pState, BB_CLEAR_NEUTRAL, 1, pRect);
1610-
#ifdef SHOW_TIME
1610+
#if defined( SHOW_TIME ) && defined( ARDUINO )
16111611
l = millis() - l;
16121612
Serial.printf("clear time = %dms\n", (int)l);
16131613
l = millis();
@@ -1834,17 +1834,11 @@ int bbepPartialUpdate(FASTEPDSTATE *pState, bool bKeepOn, int iStartLine, int iE
18341834
bbepWriteRow(pState, d, (pState->native_width / 4), (i!=0));
18351835
iSkipped = 0;
18361836
} else {
1837-
if (iSkipped >= 2) {
1838-
gpio_set_level((gpio_num_t)pState->panelDef.ioCKV, 1); // CKV_SET;
1839-
delayMicroseconds(35);
1840-
bbepRowControl(pState, ROW_STEP);
1841-
} else {
1842-
// write 2 floating rows
1843-
if (iSkipped == 0) { // skip
1844-
memset((void *)d, 0, pState->native_width/4);
1845-
}
1846-
bbepWriteRow(pState, d, (pState->native_width / 4), (i!=0));
1847-
}
1837+
// write a neutral row
1838+
if (iSkipped == 0) { // new skipped section
1839+
memset((void *)d, 0, pState->native_width/4);
1840+
}
1841+
bbepWriteRow(pState, d, (pState->native_width / 4), (i!=0));
18481842
iSkipped++;
18491843
}
18501844
dp += iDelta;
@@ -1853,10 +1847,9 @@ int bbepPartialUpdate(FASTEPDSTATE *pState, bool bKeepOn, int iStartLine, int iE
18531847
// delayMicroseconds(230);
18541848
} // for each pass
18551849

1856-
if (bKeepOn) {
1857-
// bbepClear(pState, BB_CLEAR_NEUTRAL, 1, NULL);
1858-
} else {
1859-
bbepClear(pState, BB_CLEAR_NEUTRAL, 1, NULL);
1850+
// This clear to neutral step is necessary; do not remove
1851+
bbepClear(pState, BB_CLEAR_NEUTRAL, 1, NULL);
1852+
if (!bKeepOn) {
18601853
bbepEinkPower(pState, 0);
18611854
}
18621855
int offset = iStartLine * (pState->native_width/8);

0 commit comments

Comments
 (0)