bitbank2 / ss_oled

Simple and small library to control 1-bpp OLED displays (Linux + Arduino)
GNU General Public License v3.0
190 stars 34 forks source link

ss_oled.cpp compile time errors for Arduinos #3

Closed antman2 closed 5 years ago

antman2 commented 5 years ago

Arduino IDE updated ss_oled from v1.1.5 to v2.0.0 tonight. It is no longer usable on Arduinos such as the Pro Mini due to compile time errors:

/Users/.../Documents/Arduino/libraries/ss_oled/src/ss_oled.cpp: In function 'int oledScrollBuffer(int, int, int, int, int)':
/Users/.../Documents/Arduino/libraries/ss_oled/src/ss_oled.cpp:866:18: error: 'ucScreen' was not declared in this scope
             s = &ucScreen[(row * 128) + iStartCol];
                  ^
/Users/.../Documents/Arduino/libraries/ss_oled/src/ss_oled.cpp:881:18: error: 'ucScreen' was not declared in this scope
             s = &ucScreen[(row * 128)+iStartCol];
                  ^

Checking ss_oled.cpp we see:

#ifdef USE_BACKBUFFER
static unsigned char ucScreen[1024]; // local copy of the image buffer
#endif

and...

//
// For non-AVR micros, 1K of RAM isn't fatal
//
#ifndef __AVR__
#define USE_BACKBUFFER
#endif // !__AVR__
bitbank2 commented 5 years ago

I pushed a fix for this, but I guess it didn't get picked up by the library manager because I didn't do an official new release. Please do a git pull and you'll have the fix until the library manager catches the new release (2.0.1).