-
Notifications
You must be signed in to change notification settings - Fork 657
Mbed os support #243
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
Mbed os support #243
Conversation
Added I2C mbed uspport via SSD1306I2C.h
…h I2C, more displays and SPI will follow later. Added for mbed a very simple Arduino String emulation which allows to call drawString using UTF8 chars. Changed the Arduino byte into an uint8_t to be mbed compatible. Support the mbed-os Stream class (Arduino uses Print) mbed-os does not support C++11 initialisers in .h class files therefore I initialise variables in the constructor. Changed initialisers functions (fontTableLookupFunction, loadingDrawFunction) to be separate functions to support the mbed-os compiler To use the library for mbed-os copy the following files into your mbed-os project: OLEDDisplay.cpp OLEDDisplayFonts.h OLEDDisplayUi.h OLEDDisplay.h OLEDDisplayUi.cpp SSD1306I2C.h
the initial work was the GNU Compiler
PAGEADDR 0 resets the value, no ending page address is allowed This overcomes the around warpping problem
…dots. Added setGeometry high/width optional parameters to allow custom bitmaps.
…default font. I believe this is a very important feature because it eliminates the memory requirement for a font never being used.
|
Looks like a great extension of this library. Can I ask you to fix the merge conflicts in |
|
Hi @helmut64 |
|
@marcelstoer @squix78 Moin, thank you for getting back to me. Of course I love to contribute here to this great project. I will work on my patches to fix conflicts to get them merged when you are ready. |
…sd1306 into mbed_os_support
👍 👏 That latest commit caused a bit of a mess. You've now got I suggest you revert that (merge) commit and rebase your changes on the current master. Whether you also want to squash your commits is up to you. We can easily do this here on GitHub while merging the PR. |
|
Hi Marcel, this was a conflict from my last merge, sorry for it. I updated it. |
|
I see... Two of the last last four commits in your branch are potentially problematic.
The other two are then just means to deal with those two. I tried to address this in a separate branch. I took your branch, removed the last four commits, rebased it on master and pushed it to our repo. This retains you as the author of the changes so you can get proper OSS credits/karma for them 😉I'd now like to offer https://github.com/ThingPulse/esp8266-oled-ssd1306/compare/helmut64-mbed_os_support_clean?expand=1 as an alternative to this PR. Please take a look and check whether everything you expect to be there is actually there. |
|
Dear Marcel, I don’t mind if I get mentioned in the Readme or source files, you are welcome to remove my name from this. I just like to help to enhance this library and to add support for mbed-os. Of course I am capable to do mbed-os and Arduino support when time allows. I was hoping to get the mbed-os support merged into the head version. |
|
PS: There are changes which are independent of mbed-os, e.g.:
|
|
There must be a misunderstanding (or two) somewhere.
The exact opposite was my intention. I wanted to keep you as the author of the changes. #251 also still shows the "Copyright (c) 2019 by Helmut Tschemernjak" comments you added.
See above. I will also add your name to the "Credits" section in the README.
Me too 😄 -> #251
Yep, I noticed during review. It would now be a bit time consuming and yield little benefit to sort this out. Hence, we won't. However, in general we do appreciate if you create 1 PR for 1 feature. It's easier to review and reason about. |
|
I will do better single pull requests in the future, thanks for working on it. |
|
I verified that the new version works on the Arduino ESP32 and mbed-os, all fine. Thank you for your support. |
|
I verified that the new version works on the ESP32 and mbed-os, all fine. Thank you for your support. |
All changes have been tested to work on Arduino (ESP32) and mbed-os
Added display library support for mbed-os. At preset with SSD1306 with I2C, more displays and SPI will follow later.
Added for mbed a very simple Arduino String emulation which allows to call drawString using UTF8 chars.
Changed the Arduino byte into an uint8_t to be mbed compatible.
Support the mbed-os Stream class (Arduino uses Print)
mbed-os does not support C++11 initialisers in .h class files therefore I initialise variables in the constructor.
Changed initialisers functions (fontTableLookupFunction, loadingDrawFunction) to be separate functions to support the mbed-os compiler
To use the library for mbed-os copy the following files into your mbed-os project:
OLEDDisplay.cpp OLEDDisplayFonts.h OLEDDisplayUi.h OLEDDisplay.h
OLEDDisplayUi.cpp SSD1306I2C.h