-
Notifications
You must be signed in to change notification settings - Fork 657
Support multiple display resolutions #133
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
Conversation
- 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)
|
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. |
|
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. |
Applied PR from esp8266-oled-ssd1306: ThingPulse/esp8266-oled-ssd1306#133
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.
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.
* [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
|
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. |
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.