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

Design screen API #7

Open
thejpster opened this issue Apr 8, 2018 · 8 comments
Open

Design screen API #7

thejpster opened this issue Apr 8, 2018 · 8 comments

Comments

@thejpster
Copy link
Member

It should be broadly like the Python API to makes things simple for new users.

See https://pythonhosted.org/sense-hat/api/.

WIP in the https://github.com/thejpster/sensehat-rs/tree/matrix_api branch.

@thejpster
Copy link
Member Author

cc: @saibatizoku

@saibatizoku
Copy link
Contributor

Cool. FYI - I'm still testing a basic 8x8 rotation directly on the FrameLine, and will be adding that as as another feature of the sensehat-screen crate. I'm also prototyping a scrolling-frame feature... all of this without external dependencies.

I'm all about the zen of zero-copy and keeping things light... sometimes I'm successful at it. :)

@thejpster
Copy link
Member Author

Excellent! It is right that your crate be as efficient as possible, while mine is a substitute for Python usable by complete Rust novices. I'm therefore happy to put a layer over your crate which is simpler, but slower.

I have to keep my own buffer unfortunately because I need to read and write RGB triplets individually but that's no real bother.

@saibatizoku
Copy link
Contributor

Agreed! That's also the reason why I didn't implement Screen::open like the Python package (by searching for the fb by name), I think that's more up your crate's alley.

@saibatizoku
Copy link
Contributor

saibatizoku commented Apr 8, 2018

FYI, I just bumped the version for sensehat-screen, for your WIP branch.

@thejpster
Copy link
Member Author

thejpster commented May 4, 2018 via email

@thejpster
Copy link
Member Author

I've added text and clear methods to the SenseHat struct, as per your examples, as I needed it for a tutorial.

I have some thoughts about the sensehat-screen crate API but that shouldn't this very high-level API.

@saibatizoku
Copy link
Contributor

Thanks! I didn't have time these past months to work on those methods, I'll sync with you repo.

I'd love to hear your thoughts on the API.

My process has been to write the code from the bottom up, mainly to learn Rust, that's the reason for adding structs/enums for new features. I think that I'm at a point in which I can refactor for a better user experience.

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

No branches or pull requests

2 participants