From c41db33f0117bc67478213e8119b38b25c6e0c9d Mon Sep 17 00:00:00 2001 From: Steven Tracey Date: Thu, 21 Nov 2024 22:58:51 -0500 Subject: [PATCH] Twekn it --- c/src/p2fa.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/c/src/p2fa.c b/c/src/p2fa.c index 918f172..f5a24f2 100644 --- a/c/src/p2fa.c +++ b/c/src/p2fa.c @@ -75,13 +75,13 @@ void code(UWORD *blackImage, char* confName) { startTime = clock(); DebugLine(4, 0, "Time Left: %d\n", i); - double percentLeft = ((double) i / (double) (30 * 1000)); - progBarEndIndex = 228 - ((int) (228 * percentLeft)); - Paint_ClearWindows(progBarCurrentIndex, 111, progBarEndIndex, 93, WHITE); + double percentLeft = (double) i / (double) (30 * 1000); + progBarEndIndex = 228 - (int) (228 * percentLeft); + Paint_ClearWindows(progBarCurrentIndex, 113, progBarEndIndex, 93, WHITE); int line = 15; while (progBarCurrentIndex < progBarEndIndex) { - DebugLine(line, 0, "Line: %d,111 - %d,93\n", progBarCurrentIndex, progBarEndIndex); - Paint_DrawLine(progBarCurrentIndex, 111, progBarCurrentIndex, 93, BLACK, DOT_PIXEL_1X1, + DebugLine(line, 0, "Line: %d,113 - %d,93\n", progBarCurrentIndex, progBarEndIndex); + Paint_DrawLine(progBarCurrentIndex, 113, progBarCurrentIndex, 93, BLACK, DOT_PIXEL_1X1, LINE_STYLE_SOLID); ++progBarCurrentIndex; ++line; @@ -125,7 +125,6 @@ void home(UWORD *blackImage) { } EPD_2in13_V4_Display_Base(blackImage); - Paint_NewImage(blackImage, EPD_2in13_V4_WIDTH, EPD_2in13_V4_HEIGHT, 0, WHITE); Paint_SelectImage(blackImage); @@ -151,7 +150,6 @@ void home(UWORD *blackImage) { code(blackImage, configNames[i]); Paint_NewImage(blackImage, EPD_2in13_V4_WIDTH, EPD_2in13_V4_HEIGHT, 0, WHITE); - EPD_2in13_V4_Init(); Paint_SelectImage(blackImage); Paint_Clear(WHITE); for (int j = 0; j < length; j++) { @@ -163,8 +161,6 @@ void home(UWORD *blackImage) { EPD_2in13_V4_Display_Base(blackImage); Paint_NewImage(blackImage, EPD_2in13_V4_WIDTH, EPD_2in13_V4_HEIGHT, 0, WHITE); Paint_SelectImage(blackImage); - i = 0; - Paint_DrawString(115, 5 + (i * 20), "<", &Font12, WHITE, BLACK); break; case 'q':