Skip to content

Commit c3994dd

Browse files
committed
Inkplate2 merge fixes.
1 parent 80e720e commit c3994dd

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

src/include/Image.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@ class Image : virtual public NetworkClient, virtual public Adafruit_GFX
5353

5454
virtual void drawPixel(int16_t x, int16_t y, uint16_t color) = 0;
5555

56-
virtual uint8_t getDisplayMode() = 0;
57-
5856
#if !defined(ARDUINO_INKPLATECOLOR) && !defined(ARDUINO_INKPLATE2)
5957
virtual void selectDisplayMode(uint8_t _mode) = 0;
58+
virtual uint8_t getDisplayMode() = 0;
6059
#endif
6160

6261
virtual int16_t width() = 0;

src/include/ImageBMP.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,8 @@ void Image::displayBmpLine(int16_t x, int16_t y, bitmapHeader *bmpHeader, bool d
475475
#ifndef ARDUINO_INKPLATECOLOR
476476
if (invert)
477477
val = 7 - val;
478-
if (getDisplayMode() == INKPLATE_1BIT)
479-
val = (~val >> 2) & 1;
478+
// if (getDisplayMode() == INKPLATE_1BIT)
479+
// val = (~val >> 2) & 1;
480480
#elif defined(ARDUINO_INKPLATE2) || defined(ARDUINO_INKPLATE4)
481481
if (invert)
482482
val = val ^ 1;

src/include/System.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ uint8_t System::readTouchpad(uint8_t _pad)
9494
return digitalReadInternal(IO_INT_ADDR, ioRegsInt, _pad);
9595
}
9696

97-
#endif
98-
9997
/**
10098
* @brief readBattery reads voltage of the battery
10199
*
@@ -141,8 +139,6 @@ double System::readBattery()
141139
return (double(adc) * 2.0 / 1000);
142140
}
143141

144-
#ifndef ARDUINO_INKPLATE2
145-
146142
/**
147143
* @brief sdCardInit initializes sd card trough SPI
148144
*

src/include/System.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,12 @@
9090
#include "defines.h"
9191

9292
/**
93-
* @brief System class for interaction with panel harware
93+
* @brief System class for interaction with panel hardware
9494
*/
9595
class System : public Esp,
96+
#ifndef ARDUINO_INKPLATE2
9697
virtual public Expander,
97-
98+
#endif
9899
#if defined(ARDUINO_INKPLATE6PLUS) || defined(ARDUINO_INKPLATE6PLUSV2)
99100
public Touch,
100101
public Frontlight,

0 commit comments

Comments
 (0)