Skip to content

Commit 450b306

Browse files
committed
Made fixes to pass compile tests
1 parent 6e7ae7b commit 450b306

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

examples/Inkplate4/Diagnostics/Inkplate4_Burn_In_Clean/Inkplate4_Burn_In_Clean.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void setup()
4444

4545
// Print text when clearing is done.
4646
display.setTextSize(4);
47-
display.setCursor(30, 130);
47+
display.setCursor(34, 130);
4848
display.setTextColor(INKPLATE_RED, INKPLATE_WHITE);
4949
display.print("Clearing done.");
5050
display.display();

examples/Inkplate4/Projects/Inkplate4_Google_Calendar/Inkplate4_Google_Calendar.ino

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,11 @@ void setup()
9191

9292
// Allocate memory for the data
9393
data = (char *)ps_malloc(2000000LL);
94-
if(data == NULL)
94+
if (data == NULL)
9595
{
96-
Serial.println("Memory allocation error");
97-
while(1);
96+
Serial.println("Memory allocation error");
97+
while (1)
98+
;
9899
}
99100

100101
// Init library (you should call this function ONLY ONCE)
@@ -308,7 +309,7 @@ bool drawEvent(entry *event, int day, int beginY, int maxHeigth, int *heigthNeed
308309

309310
// Insert line brakes into setTextColor
310311
int lastSpace = -100;
311-
display.setCursor(x1 + 9 - day, beginY+5);
312+
display.setCursor(x1 + 9 - day, beginY + 5);
312313
for (int i = 0; i < min((size_t)64, strlen(event->name)); ++i)
313314
{
314315
// Copy name letter by letter and check if it overflows space given
@@ -357,7 +358,7 @@ bool drawEvent(entry *event, int day, int beginY, int maxHeigth, int *heigthNeed
357358
{
358359
display.println(event->time);
359360

360-
display.setCursor(x1 + 6, display.getCursorY()+10);
361+
display.setCursor(x1 + 6, display.getCursorY() + 10);
361362

362363
char line[128] = {0};
363364

@@ -494,8 +495,10 @@ void drawData()
494495
if (clogged[i])
495496
{
496497
// Draw notification showing that there are more events than drawn ones
497-
display.fillRoundRect(6 + i * ((E_INK_WIDTH - 4) / 4) - i, 300 - 24, ((E_INK_WIDTH - 4) / 4) - 5, 20, 10, INKPLATE_WHITE);
498-
display.drawRoundRect(6 + i * ((E_INK_WIDTH - 4) / 4) - i, 300 - 24, ((E_INK_WIDTH - 4) / 4) - 5, 20, 10, INKPLATE_BLACK);
498+
display.fillRoundRect(6 + i * ((E_INK_WIDTH - 4) / 4) - i, 300 - 24, ((E_INK_WIDTH - 4) / 4) - 5, 20, 10,
499+
INKPLATE_WHITE);
500+
display.drawRoundRect(6 + i * ((E_INK_WIDTH - 4) / 4) - i, 300 - 24, ((E_INK_WIDTH - 4) / 4) - 5, 20, 10,
501+
INKPLATE_BLACK);
499502
display.setCursor(26 + i * ((E_INK_WIDTH - 3) / 4), 280);
500503
Serial.println(display.getCursorY());
501504
display.setFont(&Picopixel);

examples/Inkplate6/Diagnostics/Inkplate6_Factory_Programming_VCOM/InkplateEasyCTester/InkplateEasyCTester.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
***************************************************/
3131

3232
// Block usage of this code on Inkplate boards.
33-
#if !defined(ARDUINO_ESP32_DEV) || !defined(ARDUINO_INKPLATE6V2)
33+
#if !defined(ARDUINO_ESP32_DEV) && !defined(ARDUINO_INKPLATE6V2)
3434

3535
// Include a Wire library (for I2C communication)
3636
#include "Wire.h"

src/include/NetworkClient.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ class NetworkClient
6363
uint8_t *downloadFileHTTPS(const char *url, int32_t *defaultLen);
6464
uint8_t *downloadFile(WiFiClient *url, int32_t len);
6565

66-
bool getNTPEpoch(time_t *timeEpoch, int timeZone = 0, char *ntpServer = "pool.ntp.org",
66+
// The default parameters for nptServer here are cast to (char*) to keep the compiler happy
67+
bool getNTPEpoch(time_t *timeEpoch, int timeZone = 0, char *ntpServer = (char*)"pool.ntp.org",
6768
int daylightSavingsOffsetHours = 0);
68-
bool getNTPDateTime(tm *timeEpoch, int timeZone = 0, char *ntpServer = "pool.ntp.org",
69+
bool getNTPDateTime(tm *timeEpoch, int timeZone = 0, char *ntpServer = (char*)"pool.ntp.org",
6970
int daylightSavingsOffsetHours = 0);
7071

7172
void setFollowRedirects(followRedirects_t f);

0 commit comments

Comments
 (0)