sparkfun / SparkFun_Qwiic_OLED_Arduino_Library

Arduino Library for SparkFun's OLED Qwiic (I²C) boards
https://docs.sparkfun.com/SparkFun_Qwiic_OLED_Arduino_Library/introduction/
Other
6 stars 7 forks source link

Adding object oriented syntactical sugar #13

Closed PaulZC closed 8 months ago

PaulZC commented 8 months ago

Adding that object oriented syntactical sugar you requested...! ;-)

It works nicely. And is much more elegant. But I don't quite understand why the calls to setViewport etc. have to be made through this->QwGrSSD1306:: for it to work. If I remove those, it stops working - the settings are all written out as zeros. The other QwOLED classes work without this... Puzzling!

gigapod commented 8 months ago

Looks good. I'm also not sure why you have to use this-> in your subclass, but it's probably some odd c++ behavior that is super important to someone :)