-
Notifications
You must be signed in to change notification settings - Fork 83
Moved more general code to properties.rs for deduplication #39
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
Moved more general code to properties.rs for deduplication #39
Conversation
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
|
Moving some common code from graphics mode over to properties.rs for deduplication purposes and to clean up the mode. The whole chunk of |
jamwaffles
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup ❤. Just a couple of doc comments and we're good to go.
Small nit: I'm starting to think properties isn't the right name for this stuff. I'm absolutely fine not bikeshedding a variable name, but do you have a better one in mind we could use?
src/properties.rs
Outdated
| /// Initialize display in column mode | ||
| pub fn init_column_mode(&mut self) -> Result<(), DI::Error> { | ||
| // TODO: Break up into nice bits so display modes can pick whathever they need | ||
| // Display is set up in column mode, i.e. a byte walks down a column of 8 pixels from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this to the function docblock? Would be helpful to have in the rendered docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, that's why I was asking for naming ideas before. DisplaySetup would work, DisplayConfiguration also.
src/mode/graphics.rs
Outdated
| } | ||
| } | ||
|
|
||
| // Display is set up in column mode, i.e. a byte walks down a column of 8 pixels from column 0 on the left, to column _n_ on the right |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be useful to have in the rendered docs too.
| } | ||
|
|
||
| /// Reset display | ||
| // TODO: Move to a more appropriate place |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, yes this is a strange one. It's only applicable to the SPI interface which makes placing it in the architecture of this crate pretty weird. Do you have any thoughts where this could go?
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
|
Thanks for the doc changes. I can't think of a good name now so let's just get this change merged :) |
Signed-off-by: Daniel Egger daniel@eggers-club.de