Closed caemor closed 5 years ago
Great! I'll try to review and test shortly!
You need to rust-fmt to make travis happy.
Thanks!
It let it run since the morning today and when I came back there was once more the problem that it doesn`t change back to the quick refresh lut after doing the full slow refresh at the full hour.
Commenting out the if-braces (https://github.com/caemor/rusty-clock/blob/master/src/main.rs#L285) helps so I might need to revert the changes from https://github.com/TeXitoi/rusty-clock/pull/18/commits/3df16098a6dfaad073fdf135c1d025278b9609d5 but then the LUT is set each second which is just uneccessary.
I am still unsure why it doesn`t work with the if-case.
Maybe that's because sometime the command is sent while the screen ils busy. I've seen that you don't wait for busy to be stoped before sending commands in your driver.
Yeah I only used them for sleep and init at the moment. It seems I didnt test them extensively enough when removing/reducing all the delays. The delay after calling DISPLAY.display_frame is necessary and also reasonable since it doesn
t just need to write some data but rather needs some time to run all the Display Refreshes.
With the new fix it works fine, but I also released a patch for the epd_waveshare crate with the fixes for epd1in54 and epd2in9.
I removed all the old comments and added busy_waits everywhere directly in the new version of the epd_waveshare crate.
Great!
Looking at https://github.com/caemor/epd-waveshare/commit/7b4a7f057855a43895c984aed5c2a542827a8828 I think it would be better if the wait is done before the command, not after. This way, you can sleep while some work is done on the screen, and wait to the screen being ready before sending another command.
In our case, it would allow to go to sleep during the refresh of the screen, but waiting for the screen to be ready before sending a new image.
That makes sense. I'm going to change this for the next release then.
I'll try to flash it tonight before merging.
Works as expected. Thanks!
I think I got everything working now, I only might need to test the switch from partial refresh to full refresh to partial refresh a bit more and clean up a few comments