Skip to content

Conversation

@DaveRichmond
Copy link

Here's basic support for displays of different sizes. I only have an I2C 64x48 SSD1306 and 128x64 SSD1306 display to test with and have only implemented it for the Wire backend (tried it with brzo but had issues elsewhere with timing).

Hopefully it gives a good starting point if someone has other displays to test with as the display/interface-specific code is fairly minimal.

- constructor now takes optional display size (for compatibility, if nothing is specified then behaviour should be unchanged).
- various magic numbers (mostly in the ui) now calculate based on display size
- FIXME: only supported on the SSD1306Wire implementation (everything else will still assume 128x64)
@micooke
Copy link

micooke commented Aug 20, 2017

First of all, thanks for the mod. Im looking at using this for a 64x32 oled.

Secondly, and this is more a general question, but why are we using signed integers? The screens we are talking about all fit in to a uint8_t. You save memory and do not require negative checks if you use uint8_t.

@micooke
Copy link

micooke commented Aug 21, 2017

With this pull request, you only consider the default case so (unless im missing something) there is currently no way to propogate a non-default height, width to the child classes like SSD1306 SPI et al who have constructors with pin assignments.

A second thing, the internal use of width() instead of the internal _width parameter adds unnecessary overhead due to the additional function calls.

The use of public width() like this is designed so that external calls dont have direct access to internal variables.

TD-er added a commit to TD-er/ESPEasy that referenced this pull request Feb 3, 2018
TD-er added a commit to TD-er/esp8266-oled-ssd1306 that referenced this pull request Feb 3, 2018
Library did some allocs without free and lots of un-initialized variables.

Applied pull requests from esp8266-oled-ssd1306:

ThingPulse#169
ThingPulse#157
ThingPulse#144

And applied the suggestions from issues:
ThingPulse#170
ThingPulse#161

Support multiple display resolutions

Applied PR from esp8266-oled-ssd1306:
ThingPulse#133

Better Brightness / Contrast control

Suggestions taken from this issue:
ThingPulse#134

It is now the same version as being used in ESPeasy.
TD-er added a commit to TD-er/esp8266-oled-ssd1306 that referenced this pull request Feb 3, 2018
Library did some allocs without free and lots of un-initialized variables.

Applied pull requests from esp8266-oled-ssd1306:

ThingPulse#169
ThingPulse#157
ThingPulse#144

And applied the suggestions from issues:
ThingPulse#170
ThingPulse#161

Support multiple display resolutions

Applied PR from esp8266-oled-ssd1306:
ThingPulse#133

Better Brightness / Contrast control

Suggestions taken from this issue:
ThingPulse#134

It is now the same version as being used in ESPeasy.
psy0rz pushed a commit to letscontrolit/ESPEasy that referenced this pull request Feb 5, 2018
* [OLED framed] Backport of OLED lib upgrade from Mega to v2.0

Lots of issues with older lib and the newer version in the Mega branch appeared to be very stable.

* [OLED framed] Use less string allocations

And a first attempt to display the Euro sign. (does not yet work)

* [Special Char] Allow to use special characters

For some special characters, it is often hard to find them and/or use them in URL or JSON streams.
For a subset of supported special characters, a short notation and HTML equivalent is added.
These can be used anywhere.

* [OLED lib] Fixed memory leak

Man library did some allocs without free.
Also unneeded allocs.

* Applied pull requests from esp8266-oled-ssd1306:
ThingPulse/esp8266-oled-ssd1306#169
ThingPulse/esp8266-oled-ssd1306#157
ThingPulse/esp8266-oled-ssd1306#144

And applied the suggestions from issues:
ThingPulse/esp8266-oled-ssd1306#170
ThingPulse/esp8266-oled-ssd1306#161

* [OLED] Support multiple display resolutions

Applied PR from esp8266-oled-ssd1306:
ThingPulse/esp8266-oled-ssd1306#133

* [OLED] Better Brightness / Contrast control

Suggestions taken from this issue:
ThingPulse/esp8266-oled-ssd1306#134

* [OLED] Set contrast to High by default, when no choice was made

Sounds like a valid choice, based on the findings in issue #821

* Compiler error on comments

As suggested here: https://github.com/TD-er/ESPEasy/pull/3/files
@squix78
Copy link
Collaborator

squix78 commented Mar 14, 2018

Thank you so much for your contribution and sorry for my late response. Your changes were superseded by other PRs and are now in one or another form part of the code base.

@squix78 squix78 closed this Mar 14, 2018
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