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

feat: display inversion command #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rafaltrojniak
Copy link

@rafaltrojniak rafaltrojniak commented Sep 18, 2024

Add display inversion command.
Add inversion example with changing screen inversion
without redrawing it (basically blinking the screen).

@rafaltrojniak rafaltrojniak force-pushed the feat/adding_set_invertion branch from 55c19cb to a31b2c1 Compare September 19, 2024 19:29
@UncleGrumpy
Copy link

UncleGrumpy commented Sep 19, 2024

This is a nice addition. There are definitely times this can be a very useful feature.

I should have been a little more clear. We like for the examples to be a simple demonstration of a single feature. So rather than add to or modify the existing ssd1306_example, it would be better to add a second example (ssd1306_inversion_example) that just demonstrates the inversion feature you have added. This makes it easier for newcomers to see how a particular feature works without getting overwhelmed by a more complex application. And perhaps for simplicity, rather than involve the gpio driver, maybe invert the display in a recursive function that just flips the direction every 5000 milliseconds or so.

We do also welcome more complex application examples, but we call these demos, and usually add them to a separate folder like we do in the atomvm_examples repo.

@rafaltrojniak rafaltrojniak force-pushed the feat/adding_set_invertion branch from a31b2c1 to 44757ad Compare September 19, 2024 20:48
@rafaltrojniak
Copy link
Author

Thanks @UncleGrumpy for the feedback.
I have moved the example to separate new project under examples directory.

src/ssd1306.erl Outdated Show resolved Hide resolved
nifs/atomvm_ssd1306.c Outdated Show resolved Hide resolved
nifs/atomvm_ssd1306.c Outdated Show resolved Hide resolved
nifs/atomvm_ssd1306.c Outdated Show resolved Hide resolved
@UncleGrumpy
Copy link

UncleGrumpy commented Sep 20, 2024

You should probably update the commit message to reflect the changes you made to the example of the inversion feature. ;-)

@rafaltrojniak rafaltrojniak force-pushed the feat/adding_set_invertion branch from 44757ad to 8413066 Compare September 20, 2024 21:30
nifs/atomvm_ssd1306.c Show resolved Hide resolved
@rafaltrojniak rafaltrojniak force-pushed the feat/adding_set_invertion branch 3 times, most recently from 0e5a8c3 to aa8ccb2 Compare September 20, 2024 22:02
Add display inversion command.
Add inversion example with changing screen inversion
without redrawing it (basically blinking the screen).

Signed-off-by: Rafał Trójniak <git@trojniak.net>
@rafaltrojniak rafaltrojniak force-pushed the feat/adding_set_invertion branch from aa8ccb2 to 6a468fe Compare September 20, 2024 22:05
@rafaltrojniak
Copy link
Author

Hey @UncleGrumpy , is there anything else I can do to improve that ?

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.

2 participants