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

OLED driver function to set pixels #9713

Merged
merged 5 commits into from
Jul 16, 2020

Conversation

GauthamYerroju
Copy link
Contributor

@GauthamYerroju GauthamYerroju commented Jul 12, 2020

Add a function to set individual pixels to oled driver.

Description

Add a function to turn an individual pixel on or off, based on x and y coordinates. Coordinates start from top-left and positive values of x and y move right and down respectively.

Allows for things like a starfield (example code), or bitmap rendering at exact pixel positions (example code).

The bitmap rendering example code has an implementation for oled_write_bitmap(bitmap, x, y, width, height, erase_flag) (here) and it works great, but I am not sure if it's performant or worthy enough for a PR. I am able to push 60 fps on the DVD logo without noticeable lag on pro micros (granted my max WPM is only around 50).

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

None

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@fauxpark fauxpark requested a review from a team July 12, 2020 17:54
docs/feature_oled_driver.md Outdated Show resolved Hide resolved
@fauxpark fauxpark requested a review from a team July 13, 2020 00:04
@tzarc tzarc merged commit 92d0a71 into qmk:master Jul 16, 2020
@GauthamYerroju
Copy link
Contributor Author

Awesome, thank you!

drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Aug 9, 2020
* Add a function to set individual pixels

* Add documentation for oled_write_pixel

* use smaller data type for oled_write_pixel

* Fix boundary check edge case

* Update oled_write_pixel doc

Co-authored-by: Ryan <[email protected]>

Co-authored-by: Ryan <[email protected]>
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* Add a function to set individual pixels

* Add documentation for oled_write_pixel

* use smaller data type for oled_write_pixel

* Fix boundary check edge case

* Update oled_write_pixel doc

Co-authored-by: Ryan <[email protected]>

Co-authored-by: Ryan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants