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 e432acb9..44e58622 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 7b07b546..b0b65112 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 483c7309..97600d73 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 5c632ee7..3c5f346c 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 82699ebe..932065ab 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 295c3782..76ddd7f8 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 188ab466..e84a1267 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 700b4e45..6a3f4d96 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), ".");