diff --git a/examples/Inkplate10/Projects/Inkplate10_Crypto_Currency_Tracker/Inkplate10_Crypto_Currency_Tracker.ino b/examples/Inkplate10/Projects/Inkplate10_Crypto_Currency_Tracker/Inkplate10_Crypto_Currency_Tracker.ino index e432acb9e..44e586224 100644 --- a/examples/Inkplate10/Projects/Inkplate10_Crypto_Currency_Tracker/Inkplate10_Crypto_Currency_Tracker.ino +++ b/examples/Inkplate10/Projects/Inkplate10_Crypto_Currency_Tracker/Inkplate10_Crypto_Currency_Tracker.ino @@ -211,7 +211,7 @@ void drawGraph() for (int i = 0; i < 5; ++i) { itoa(((day - i * 7) % 31 + 31) % 31, temp, 10); - itoa(month - ((day - i * 7) <= 0), temp + 32, 10); + itoa(month - ((day - i * 7) <= 0 ? (month == 1 ? -11 : 1) : 0), temp + 32, 10); strncpy(dates + 8 * (4 - i), temp, 8); strcat(dates + 8 * (4 - i), "."); diff --git a/examples/Inkplate4/Projects/Inkplate4_Crypto_Currency_Tracker/Inkplate4_Crypto_Currency_Tracker.ino b/examples/Inkplate4/Projects/Inkplate4_Crypto_Currency_Tracker/Inkplate4_Crypto_Currency_Tracker.ino index 7b07b5463..b0b65112a 100644 --- a/examples/Inkplate4/Projects/Inkplate4_Crypto_Currency_Tracker/Inkplate4_Crypto_Currency_Tracker.ino +++ b/examples/Inkplate4/Projects/Inkplate4_Crypto_Currency_Tracker/Inkplate4_Crypto_Currency_Tracker.ino @@ -216,7 +216,7 @@ void drawGraph() for (int i = 0; i < 5; ++i) { itoa(((day - i * 7) % 31 + 31) % 31, temp, 10); - itoa(month - ((day - i * 7) <= 0), temp + 32, 10); + itoa(month - ((day - i * 7) <= 0 ? (month == 1 ? -11 : 1) : 0), temp + 32, 10); strncpy(dates + 8 * (4 - i), temp, 8); strcat(dates + 8 * (4 - i), "."); diff --git a/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_Crypto_Currency_Tracker/Inkplate4TEMPERA_Crypto_Currency_Tracker.ino b/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_Crypto_Currency_Tracker/Inkplate4TEMPERA_Crypto_Currency_Tracker.ino index 483c73095..97600d73c 100644 --- a/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_Crypto_Currency_Tracker/Inkplate4TEMPERA_Crypto_Currency_Tracker.ino +++ b/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_Crypto_Currency_Tracker/Inkplate4TEMPERA_Crypto_Currency_Tracker.ino @@ -232,7 +232,7 @@ void drawGraph() for (int i = 0; i < 5; ++i) { itoa(((day - i * 7) % 31 + 31) % 31, temp, 10); - itoa(month - ((day - i * 7) <= 0), temp + 32, 10); + itoa(month - ((day - i * 7) <= 0 ? (month == 1 ? -11 : 1) : 0), temp + 32, 10); strncpy(dates + 8 * (4 - i), temp, 8); strcat(dates + 8 * (4 - i), "."); diff --git a/examples/Inkplate5/Projects/Inkplate5_Crypto_Currency_Tracker/Inkplate5_Crypto_Currency_Tracker.ino b/examples/Inkplate5/Projects/Inkplate5_Crypto_Currency_Tracker/Inkplate5_Crypto_Currency_Tracker.ino index 5c632ee79..3c5f346c8 100644 --- a/examples/Inkplate5/Projects/Inkplate5_Crypto_Currency_Tracker/Inkplate5_Crypto_Currency_Tracker.ino +++ b/examples/Inkplate5/Projects/Inkplate5_Crypto_Currency_Tracker/Inkplate5_Crypto_Currency_Tracker.ino @@ -213,7 +213,7 @@ void drawGraph() for (int i = 0; i < 5; ++i) { itoa(((day - i * 7) % 31 + 31) % 31, temp, 10); - itoa(month - ((day - i * 7) <= 0), temp + 32, 10); + itoa(month - ((day - i * 7) <= 0 ? (month == 1 ? -11 : 1) : 0), temp + 32, 10); strncpy(dates + 8 * (4 - i), temp, 8); strcat(dates + 8 * (4 - i), "."); diff --git a/examples/Inkplate6/Projects/Inkplate6_Crypto_Currency_Tracker/Inkplate6_Crypto_Currency_Tracker.ino b/examples/Inkplate6/Projects/Inkplate6_Crypto_Currency_Tracker/Inkplate6_Crypto_Currency_Tracker.ino index 82699ebea..932065abc 100644 --- a/examples/Inkplate6/Projects/Inkplate6_Crypto_Currency_Tracker/Inkplate6_Crypto_Currency_Tracker.ino +++ b/examples/Inkplate6/Projects/Inkplate6_Crypto_Currency_Tracker/Inkplate6_Crypto_Currency_Tracker.ino @@ -212,7 +212,7 @@ void drawGraph() for (int i = 0; i < 5; ++i) { itoa(((day - i * 7) % 31 + 31) % 31, temp, 10); - itoa(month - ((day - i * 7) <= 0), temp + 32, 10); + itoa(month - ((day - i * 7) <= 0 ? (month == 1 ? -11 : 1) : 0), temp + 32, 10); strncpy(dates + 8 * (4 - i), temp, 8); strcat(dates + 8 * (4 - i), "."); diff --git a/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Crypto_Currency_Tracker/Inkplate6COLOR_Crypto_Currency_Tracker.ino b/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Crypto_Currency_Tracker/Inkplate6COLOR_Crypto_Currency_Tracker.ino index 295c37823..76ddd7f86 100644 --- a/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Crypto_Currency_Tracker/Inkplate6COLOR_Crypto_Currency_Tracker.ino +++ b/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Crypto_Currency_Tracker/Inkplate6COLOR_Crypto_Currency_Tracker.ino @@ -208,7 +208,7 @@ void drawGraph() for (int i = 0; i < 5; ++i) { itoa(((day - i * 7) % 31 + 31) % 31, temp, 10); - itoa(month - ((day - i * 7) <= 0), temp + 32, 10); + itoa(month - ((day - i * 7) <= 0 ? (month == 1 ? -11 : 1) : 0), temp + 32, 10); strncpy(dates + 8 * (4 - i), temp, 8); strcat(dates + 8 * (4 - i), "."); diff --git a/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Crypto_Currency_Tracker/Inkplate6PLUS_Crypto_Currency_Tracker.ino b/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Crypto_Currency_Tracker/Inkplate6PLUS_Crypto_Currency_Tracker.ino index 188ab4662..e84a1267c 100644 --- a/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Crypto_Currency_Tracker/Inkplate6PLUS_Crypto_Currency_Tracker.ino +++ b/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Crypto_Currency_Tracker/Inkplate6PLUS_Crypto_Currency_Tracker.ino @@ -233,7 +233,7 @@ void drawGraph() for (int i = 0; i < 5; ++i) { itoa(((day - i * 7) % 31 + 31) % 31, temp, 10); - itoa(month - ((day - i * 7) <= 0), temp + 32, 10); + itoa(month - ((day - i * 7) <= 0 ? (month == 1 ? -11 : 1) : 0), temp + 32, 10); strncpy(dates + 8 * (4 - i), temp, 8); strcat(dates + 8 * (4 - i), "."); diff --git a/examples/Inkplate7/Projects/Inkplate7_Crypto_Currency_Tracker/Inkplate7_Crypto_Currency_Tracker.ino b/examples/Inkplate7/Projects/Inkplate7_Crypto_Currency_Tracker/Inkplate7_Crypto_Currency_Tracker.ino index 700b4e45f..6a3f4d967 100644 --- a/examples/Inkplate7/Projects/Inkplate7_Crypto_Currency_Tracker/Inkplate7_Crypto_Currency_Tracker.ino +++ b/examples/Inkplate7/Projects/Inkplate7_Crypto_Currency_Tracker/Inkplate7_Crypto_Currency_Tracker.ino @@ -216,7 +216,7 @@ void drawGraph() for (int i = 0; i < 5; ++i) { itoa(((day - i * 7) % 31 + 31) % 31, temp, 10); - itoa(month - ((day - i * 7) <= 0), temp + 32, 10); + itoa(month - ((day - i * 7) <= 0 ? (month == 1 ? -11 : 1) : 0), temp + 32, 10); strncpy(dates + 8 * (4 - i), temp, 8); strcat(dates + 8 * (4 - i), ".");