bitbank2 / OneBitDisplay

A full featured Arduino display library for 1-bit per pixel OLED, LCD and e-paper displays
Apache License 2.0
195 stars 21 forks source link

Positioning broke between v 1.11.0 and current (pre?) 2.0.0 #29

Closed cyberman54 closed 2 years ago

cyberman54 commented 2 years ago

Board: Olimex ESP32 POE ISO with SSD1306 connected via I2C

- framework-arduinoespressif32 3.20001.0 (2.0.1)
<OneBitDisplay> 2.0.0+sha.0b84b4a        
|   |-- <BitBang_I2C> 2.1.5
|   |   |-- <Wire> 2.0.0
|   |-- <SPI> 2.0.0

=> Display SSD1306 is working, but showing only two lines on the top, and with wrong positioning of text in these lines

- framework-arduinoespressif32 3.20001.0 (2.0.1)
|-- <OneBitDisplay> 1.11.0
|   |-- <BitBang_I2C> 2.1.5
|   |   |-- <Wire> 2.0.0
|   |-- <SPI> 2.0.0

=> (same) Display SSD1306 is working properly

cyberman54 commented 2 years ago

added: I can reproduce this with a different board type (a "TTGO T-fox"), which has SSD1306 too, but from different source and with different look.

My code is mainly based on methods obdSetCursor(), obdWriteString(), obdDumpBuffer(), obdFill(), obdSetBackBuffer(), obdSetTextWrap()

Initialization is

int rc = obdI2CInit(&ssoled, OLED_128x64, -1, 0, 0, 1, 21, 22, NOT_A_PIN, 400000L)
cyberman54 commented 2 years ago

See also https://github.com/cyberman54/ESP32-Paxcounter/issues/858

cyberman54 commented 2 years ago

@bitbank2 any comments? 2.0.0 seems broken.

cyberman54 commented 2 years ago

Meanwhile i figured out, positioning got broken with this commit, and was not fixed by one of the later commits.

bitbank2 commented 2 years ago

I'm sorry, I need to document all of the changes when I added the C++ class. The x/y coordinates needed to behave more like TFT_eSPI/Adafruit_GFX, so yes the Y is now in pixels not lines.

cyberman54 commented 2 years ago

What? This is major breaking change, that should have been documented somewhere. I thought this is library, not application software. It's hard to use it if suddenly breaking changes are to be expected.

But thanks for the note, it should be possible now to adapt my application.

bitbank2 commented 2 years ago

I apologize for the disturbance; you're welcome to continue using the older version of the library until I have updated the documentation.