Skip to content

Add a display_offset parameter to SH1107. #5

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

Merged
merged 1 commit into from
May 13, 2021

Conversation

lesamouraipourpre
Copy link
Contributor

The current init_sequence assumes it is connected to the Adafruit FeatherWing 128x64 OLED
screen. This parameter provides a way to set value provided to the Display Offset (D3)
command. The value of this cannot be calculated from the size of the screen (except in
the maximum case) as a manufacturer can choose where in the 128x128 grid they wire up
their screen to.

The default value has been kept to the FeatherWing value of 0x60 so this should not be a
breaking change.

Constants have been included for:

  • Adafruit FeatherWing 128x64 OLED
  • Pimoroni Mono 128x128 OLED

The current init_sequence assumes it is connected to the Adafruit FeatherWing 128x64 OLED
screen. This parameter provides a way to set value provided to the Display Offset (D3)
command. The value of this cannot be calculated from the size of the screen (except in
the maximum case) as a manufacturer can choose where in the 128x128 grid they wire up
their screen to.

The default value has been kept to the FeatherWing value of 0x60 so this should not be a
breaking change.

Constants have been included for:
* Adafruit FeatherWing 128x64 OLED
* Pimoroni Mono 128x128 OLED
@jposada202020 jposada202020 requested a review from a team April 25, 2021 20:44
@jposada202020
Copy link
Contributor

@lesamouraipourpre Thanks I noticed that you mentioned that this is not a breaking change. I could test that
So this will add support for the Pimoroni display as I can see in the code.

@kattni comments rearding this. Let me know and I could proceed to test and give my final review. Thanks

@kattni
Copy link
Contributor

kattni commented May 12, 2021

@jposada202020 As long as it doesn't break support for the Adafruit SH1107 display, it's fine to add support for the Pimoroni display. The important thing is that it defaults to the current settings so that all of the associated code does not need to be changed.

@jposada202020
Copy link
Contributor

Thanks I will test then tonight, and make my review if any, or merged... Thanks...

@jposada202020 jposada202020 requested review from jposada202020 and removed request for a team May 12, 2021 17:31
Copy link
Contributor

@jposada202020 jposada202020 left a comment

Choose a reason for hiding this comment

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

This was tested on

Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit Feather M4 CAN with same51j19a

Using a Adafruit 128x64 OLED FeatherWing and the displayio_sh1107_simpletest.py example
LIbrary worked as expected, Changes were verified. Displays default to Adafruit Display as described in the PR

Thanks for for improving the documentation also.

Looks Good To me

@jposada202020 jposada202020 merged commit 47b5a85 into adafruit:main May 13, 2021
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 14, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_BNO08X_RVC to 1.0.5 from 1.0.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_BNO08x_RVC#3 from jposada202020/improxing_docs
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_CAP1188 to 1.3.0 from 1.2.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_CAP1188#21 from jposada202020/separating_properties

Updating https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SH1107 to 1.2.0 from 1.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_DisplayIO_SH1107#5 from lesamouraipourpre/display_offset
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_EMC2101 to 1.1.8 from 1.1.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_EMC2101#17 from jposada202020/correcting_typo

Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS to 4.2.0 from 4.1.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_LSM6DS#41 from jposada202020/adding_temperature_property

Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP4728 to 1.2.0 from 1.1.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP4728#10 from codenio/feature/general_call

Updating https://github.com/adafruit/Adafruit_CircuitPython_SI4713 to 1.3.0 from 1.2.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_SI4713#18 from sheimers/master
  > "Increase duplicate code check threshold "
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.

3 participants