ISSUE #15: Backwards compatibility with previous Arduino IDE (pure virtual functions were not supported)

This commit is contained in:
rjbatista@gmail.com
2012-01-17 22:52:47 +00:00
parent fb4924cc0a
commit bdee0e3872
3 changed files with 14 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
- ISSUE #15: Backwards compatibility with previous Arduino IDE (pure virtual functions were not supported);
- ISSUE #18: Corrected problem with setLEDs() caused by changes in the previous version.
Version 2.0.0

View File

@@ -165,3 +165,9 @@ byte TM16XX::receive()
return temp;
}
#if !defined(ARDUINO) || ARDUINO < 100
// empty implementation instead of pure virtual for older Arduino IDE
void TM16XX::sendChar(byte pos, byte data, boolean dot) {}
#endif

View File

@@ -59,7 +59,13 @@ class TM16XX
const byte font[] = FONT_DEFAULT);
protected:
#if defined(ARDUINO) && ARDUINO >= 100
// pure virtual is NOT supported in older Arduino IDE
virtual void sendChar(byte pos, byte data, boolean dot) = 0;
#else
virtual void sendChar(byte pos, byte data, boolean dot);
#endif
virtual void sendCommand(byte led);
virtual void sendData(byte add, byte data);