-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
drawCircleHelper and fillCircleHelper do nothing, fillCircleHelper corner argument ignored or misapplied #265
Comments
I have solutions for the bugs articulated above, in the methods drawCircleHelper, fillCircleHelper. While working out my solutions, two additional issues, in the same methods, became apparent: Here is my thinking about how to just articulate exactly what I mean by the above two bugs: For convenience, I have mentally renamed the two affected methods drawSector and fillSector. For backward compatibility, I propose keeping the bit-map design evidenced in the code for drawCircleHelper, of 1 bit per quadrant. For clarity and rigor, I propose the following bit-to-quadrant map: With the above established, it is possible to articulate bugs 5 and 6 more precisely: Attached is a picture of my dial gauge after fixing bugs 1-4. Best, @tealok2 PS: (to any AF responder) It can be challenging, but from experience it is possible to keep a bunch of DUTs hooked up to an array of USB ports, and to upload code and test with every checkin... or at least every release. Fully automating detection of pixels-out-of-place is beyond unreasonable, but you could do something really simple... just bolt a bunch of the LCDs and OLEDs that YOU sell (you DO have a non-trivial matrix of boards, architectures, libraries and chips/drivers, so don't try to guarantee what you DON'T sell), build and put up in the displays the examples you ship. Then task SOMEONE to go look, and notice if the examples are all screwed up, or appear normal. @tealok2 |
Disregard the question about CI, because I found a pull request rejected because of Travis errors. |
Arduino board: Arduino NANO version 3
Arduino IDE version: 1.8.10
Other HW, SW and/or environment dependencies when bugs found:
Win 10
128x128 1.5-in OLED color display w SSD1351 chip, from Banggood, product 1384079
SPI can be HW or bit-banged- the bugs are not related to the SPI interface or its speed
Adafruit-GFX ver 1.5.6 and later
Adafruit-SSD1351 version 1.2.2
Bugs found:
In Adafruit-GFX.cpp, the method drawCircleHelper has no effect:
no pixels are written, in any color, in any quadrant
Root cause:
In Adafruit_GFX.cpp, version 1.5.6, about line 403:
Missing startWrite() and endWrite calls around code.
Similarly, method fillCircleHelper has no effect: no pixels are written, in any color
Root cause: same as above: missing startWrite/endWrite around code.
After fixing the above two problems, the following additional bugs became visible, when
trying to refresh/overwrite certain quadrants of a dial gauge:
The quadrant (corner) arguments are misapplied, produce incorrect results.
For example,
a command to fill quadrant 1 fills both 1 and 4
a command to fill quadrant 2 fills both 2 and 3
Other testing done:
I checked later library versions, and, for my SSD1351 display and sketch, backward compatibility got worse, not better.
I have attached a sketch which triggers or demonstrates the above defects. It is called oled_AF_GFx_1_5_7_bugs.ino.
I have also attached a photo which shows #3 and #4 above.
Best regards, Tealok2
oled_AF_GFx_bugs_1_5_7.txt
The text was updated successfully, but these errors were encountered: