Skip to content

Commit 0a1dfe2

Browse files
committed
Fixed warnings for Inkplate 10 and Inkplate 6
1 parent 8b48063 commit 0a1dfe2

File tree

3 files changed

+8
-19
lines changed

3 files changed

+8
-19
lines changed

src/boards/Inkplate10.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ void Graphics::writePixel(int16_t x0, int16_t y0, uint16_t color)
133133
int x = x0 >> 3;
134134
int x_sub = x0 & 7;
135135
uint8_t temp = *(_partial + ((E_INK_WIDTH >> 3) * y0) + x);
136-
*(_partial + (E_INK_WIDTH / 8 * y0) + x) = ~pixelMaskLUT[x_sub] & temp | (color ? pixelMaskLUT[x_sub] : 0);
136+
*(_partial + (E_INK_WIDTH / 8 * y0) + x) = (~pixelMaskLUT[x_sub] & temp) | (color ? pixelMaskLUT[x_sub] : 0);
137137
}
138138
else
139139
{
@@ -142,7 +142,7 @@ void Graphics::writePixel(int16_t x0, int16_t y0, uint16_t color)
142142
int x_sub = x0 & 1;
143143
uint8_t temp;
144144
temp = *(DMemory4Bit + (E_INK_WIDTH >> 1) * y0 + x);
145-
*(DMemory4Bit + (E_INK_WIDTH >> 1) * y0 + x) = pixelMaskGLUT[x_sub] & temp | (x_sub ? color : color << 4);
145+
*(DMemory4Bit + (E_INK_WIDTH >> 1) * y0 + x) = (pixelMaskGLUT[x_sub] & temp) | (x_sub ? color : color << 4);
146146
}
147147
}
148148

src/include/Image.h

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -78,35 +78,24 @@ class Image : virtual public NetworkClient, virtual public Adafruit_GFX
7878

7979
bool drawBitmapFromBuffer(uint8_t *buf, int x, int y, bool dither, bool invert);
8080

81-
[[deprecated("Use drawImage, as this will soon become a private method.")]] bool drawBitmapFromSd(
82-
const char *fileName, int x, int y, bool dither = 0, bool invert = 0);
81+
bool drawBitmapFromSd(const char *fileName, int x, int y, bool dither = 0, bool invert = 0);
8382
bool drawBitmapFromSd(SdFile *p, int x, int y, bool dither = 0, bool invert = 0);
8483

8584
bool drawBitmapFromWeb(const char *url, int x, int y, bool dither = 0, bool invert = 0);
8685
bool drawBitmapFromWeb(WiFiClient *s, int x, int y, int32_t len, bool dither = 0, bool invert = 0);
8786

8887
bool drawJpegFromBuffer(uint8_t *buf, int32_t len, int x, int y, bool dither, bool invert);
8988

90-
[[deprecated("Use drawImage, as this will soon become a private method.")]] bool drawJpegFromSd(
91-
const char *fileName, int x, int y, bool dither = 0, bool invert = 0);
89+
bool drawJpegFromSd(const char *fileName, int x, int y, bool dither = 0, bool invert = 0);
9290
bool drawJpegFromSd(SdFile *p, int x, int y, bool dither = 0, bool invert = 0);
9391

94-
[[deprecated("Use drawImage, as this will soon become a private method.")]] bool drawJpegFromWeb(const char *url,
95-
int x, int y,
96-
bool dither = 0,
97-
bool invert = 0);
92+
bool drawJpegFromWeb(const char *url, int x, int y, bool dither = 0, bool invert = 0);
9893
bool drawJpegFromWeb(WiFiClient *s, int x, int y, int32_t len, bool dither = 0, bool invert = 0);
9994

100-
[[deprecated("Use drawImage, as this will soon become a private method.")]] bool drawPngFromSd(const char *fileName,
101-
int x, int y,
102-
bool dither = 0,
103-
bool invert = 0);
95+
bool drawPngFromSd(const char *fileName, int x, int y, bool dither = 0, bool invert = 0);
10496
bool drawPngFromSd(SdFile *p, int x, int y, bool dither = 0, bool invert = 0);
10597

106-
[[deprecated("Use drawImage, as this will soon become a private method.")]] bool drawPngFromWeb(const char *url,
107-
int x, int y,
108-
bool dither = 0,
109-
bool invert = 0);
98+
bool drawPngFromWeb(const char *url, int x, int y, bool dither = 0, bool invert = 0);
11099
bool drawPngFromWeb(WiFiClient *s, int x, int y, int32_t len, bool dither = 0, bool invert = 0);
111100

112101
// Should be private, but needed in a png callback :(

src/include/System.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ double System::readBattery()
6868
{
6969
#ifdef ARDUINO_ESP32_DEV
7070
digitalWriteInternal(MCP23017_INT_ADDR, mcpRegsInt, 9, LOW);
71-
#else
71+
#else
7272
digitalWriteInternal(MCP23017_INT_ADDR, mcpRegsInt, 9, HIGH);
7373
#endif
7474
delay(1);

0 commit comments

Comments
 (0)