ISSUE #15: Backwards compatibility with previous Arduino IDE (pure virtual functions were not supported)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
6
TM16XX.h
6
TM16XX.h
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user