Skip to content
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

Switch to epd_waveshare crate instead of il3820 #18

Merged
merged 13 commits into from
Jun 17, 2019

Conversation

caemor
Copy link
Contributor

@caemor caemor commented Apr 4, 2019

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

@TeXitoi
Copy link
Owner

TeXitoi commented Apr 4, 2019

Great! I'll try to review and test shortly!

You need to rust-fmt to make travis happy.

Thanks!

@caemor
Copy link
Contributor Author

caemor commented Apr 5, 2019

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 3df1609 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.

@TeXitoi
Copy link
Owner

TeXitoi commented Apr 5, 2019

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.

@caemor
Copy link
Contributor Author

caemor commented Apr 6, 2019

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 doesnt 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.

Copy link
Owner

@TeXitoi TeXitoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First, sorry to only came back now.

I'm a bit disappointed by the manual busy wait: for me, this busy wait must be done before each command send, and thus enforced in the driver directly.

portable/src/ui/mod.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
@caemor
Copy link
Contributor Author

caemor commented Jun 17, 2019

I removed all the old comments and added busy_waits everywhere directly in the new version of the epd_waveshare crate.

@TeXitoi
Copy link
Owner

TeXitoi commented Jun 17, 2019

Great!

@TeXitoi
Copy link
Owner

TeXitoi commented Jun 17, 2019

Looking at caemor/epd-waveshare@7b4a7f0 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.

@caemor
Copy link
Contributor Author

caemor commented Jun 17, 2019

That makes sense. I'm going to change this for the next release then.

@TeXitoi
Copy link
Owner

TeXitoi commented Jun 17, 2019

I'll try to flash it tonight before merging.

@TeXitoi
Copy link
Owner

TeXitoi commented Jun 17, 2019

Works as expected. Thanks!

@TeXitoi TeXitoi merged commit 1eb595b into TeXitoi:master Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants