-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Areas of the screen not in the rendering area will become lighter in color. #297
Comments
My feedback w/Kindle paper white |
Got it👍 |
@martinberlin Is there a way to avoid color changes in non-rendering areas? I think if no voltage is applied to an area, its color should not change. |
Can you please post some program to replicate this? |
@martinberlin I found the problem, it was a problem with the code I rewrote. I'm using below code to replace epd_clear_area_cycles(area, 1, _clear_cycle_time);
epd_hl_update_area_directly(&hl, updateMode, temperature, area);
enum EpdDrawError epd_hl_update_area_directly(EpdiyHighlevelState* state,
enum EpdDrawMode mode,
int temperature,
EpdRect area) {
assert(state != NULL);
// Not right to rotate here since this copies part of buffer directly
bool previously_white = true;
bool previously_black = false;
memset(state->dirty_lines + area.y, 1, area.height);
enum EpdDrawError err;
if (previously_white) {
err = epd_draw_base(epd_full_screen(), state->front_fb, area,
MODE_PACKING_2PPB | PREVIOUSLY_WHITE | mode,
temperature, state->dirty_lines, state->waveform);
}
for (int l = area.y; l < area.y + area.height; l++) {
if (state->dirty_lines[l] > 0) {
uint8_t* lfb = state->front_fb + EPD_WIDTH / 2 * l; // to
uint8_t* lbb = state->back_fb + EPD_WIDTH / 2 * l; // from
for (int x = area.x; x < area.x + area.width; x++) {
if (x % 2) {
*(lbb + x / 2) = (*(lfb + x / 2) & 0xF0) | (*(lbb + x / 2) & 0x0F);
} else {
*(lbb + x / 2) = (*(lfb + x / 2) & 0x0F) | (*(lbb + x / 2) & 0xF0);
}
}
}
}
return err;
} This method will clear afterimages and ensure faster rendering speed, but the problem is: the area rendered by this function, will become lighter in color, when other area rendering. I wan't to rewrite Could you tell me the wrong of this function |
I don’t really know since I never try to use this myself. I either use the high level library or I push the raw framebuffer and do a hl_update |
It should be because of i don't known the rendering logic of epdiy clearly, i havn't got the side effect of this way. |
@vroland May you help me? I want to get the side effect of this rendering logic, and repair it. |
It seems the problem of |
Do you have an image / video of the area that gets lighter? Because to me that sounds a lot like improperly calibrated VCOM. Additionally, you could try if using the ED047TC2 waveform changes anything. Also, why are you using your own |
And, i tried not using |
Please answer this one:
I also would like to understand what is the reason to use your own high level update area instead of the one that is already built in |
This way can eliminate afterimages ( |
Can you show a video of both methods? I don't really see why they would behave different, so seeing the outcome would help. |
BeforeAfterVideohttps://github.com/lanistor/assets/blob/master/epaper/060XD4_out_paint_area.mp4 |
@vroland Is this helpful for resolving the problem? |
That makes it more clear, thanks. Curious, I don't really know why that is. I'll mark it as a bug for now and try to reproduce it some time. Do you have a minimal example for reproducing the problem handy? |
I made a minimal example : https://github.com/lanistor/epaper-tester I can reproduct problem with |
Argh, I think I only have an XC3... But I can try my luck. |
I will check because Lanistor sent me 2 XD4 and still have one around so if I find it I can send it to you in next package 📦 |
As i remembered, i sent you 2 XCD, not XD4. I could send |
@vroland Could you give me your address? I could send you 2 XD4. Here is my email: |
Hi, @vroland, @martinberlin, I found another very interesting performance that will help solve this problem: when the circuit board is powered on again, it will slowly display the last rendered content. Here is a video of my experiment: The test code for video recording is here https://github.com/lanistor/epaper-tester/tree/test/case-2, the branch is test/case-2. And here is my experimental using case:
epd_poweron();
epd_clear_area_cycles(area, 1, _clear_cycle_time);
vTaskDelay(pdMS_TO_TICKS(2000));
epd_hl_update_area_directly(&hl, updateMode, temperature, area);
epd_poweroff();
This is really a very strange behavior. The only explanation I can think of is: the electrode on the back of the screen has a weak capacitance, which stores a small amount of electricity. When the screen is powered on, these weak currents will cause the displacement of the particles. Because the second-hand screen (XD4) has been used for a long time, the capacitance will increase, causing the particle displacement to increase. I found the problem, but I don't know how to solve it. This problem is really interesting, and it's beyond my knowledge. May you find out the way to resolve this problem? Another test caseIf call // for (int i = 0; i < 10; i++) {
// epd_push_pixels(area, _clear_cycle_time, 0);
// }
for (int i = 0; i < 10; i++) {
epd_push_pixels(area, _clear_cycle_time, 1);
} Test behavior: (this case branch: test/case-3 ). |
Interesting, looks like this particular display model is very sensitive to residual charge / charge buildup. Maybe if we could dump the on-chip waveform we can fix this? Or we have to experiment with the waveforms we have. But this would be my guess that with the waveforms we have there is some imbalanced charge buildup. |
I got the knowledge here: #226 (comment) . |
@lanistor I got your displays today, now I'm going to try replicating it when I have the time :) I already tried the display with a V7 board, there it didn't behave so different, but I'll try to reproduce it with a V5 board when I have the opportunity. |
I tried to compile your example repo and I get an error with idf 4.4.5:
Any particular version of the dependencies I need? |
Probably a different version of LVGL but here I packed a way to get all in a single git clone call: https://github.com/martinberlin/lv_port_esp32-epaper/wiki/LVGL-9.0 LV_HOR_RES_MAX & LV_HOR_VER_MAX correspond if I remember well to display Width and Height. |
@vroland Have you changed the version of lvgl? The default version is If using the following code to start project, it won't need git clone [email protected]:lanistor/epaper-tester.git
cd epaper-tester
git submodule update --init --recursive
idf.py build And idf |
Ok, now it compiles but the screen doesn't update. Maybe I'll have to try with a different board when I have the chance. |
Areas of the screen that are not in the rendering area will become lighter in color.
For example, screen is
1024*758
, rendering area{x: 550, y: 30, width: 474, height: 60}
for several times, the area{x: 76, y: 90, width: 474, height: 668}
black color will fade.Like this:
No matter how I adjust the voltage, I can't fix this problem.
Is there a way to keep areas' color of the screen that are not in the rendering area unaffected?
Testing environment:
v5
060XD4
epdiy_ED060XC3
andepdiy_ED060SCT
, same behavior.lvgl
MODE_DU
, usingepd_hl_update_area
release 4.4
Demo code:
The text was updated successfully, but these errors were encountered: