From 1cb5f8bc893b18cb080522dddec929f04b5e4286 Mon Sep 17 00:00:00 2001 From: Steven Tracey Date: Thu, 21 Nov 2024 23:02:54 -0500 Subject: [PATCH] Tweaked code ui, fixed home after code --- c/src/p2fa.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/c/src/p2fa.c b/c/src/p2fa.c index f5a24f2..f4d7725 100644 --- a/c/src/p2fa.c +++ b/c/src/p2fa.c @@ -51,8 +51,8 @@ void code(UWORD *blackImage, char* confName) { GoString confStr = {confName, strlen(confName)}; const char *code = getCode(confStr); DebugLine(3, 0, "Code: %s\n", code); - Paint_DrawString(5, 5, code, &Font36, WHITE, BLACK); - Paint_DrawString(5, 84, confName, &Font12, WHITE, BLACK); + Paint_DrawString(5, 20, code, &Font36, WHITE, BLACK); + Paint_DrawString(5, 5, confName, &Font12, WHITE, BLACK); Paint_DrawRectangle(10, 114, 240, 94, BLACK, DOT_PIXEL_1X1, DRAW_FILL_EMPTY); EPD_2in13_V4_Display_Base(blackImage); @@ -130,6 +130,7 @@ void home(UWORD *blackImage) { int i = 0; Paint_DrawString(115, 5 + (i * 20), "<", &Font12, WHITE, BLACK); + EPD_2in13_V4_Display_Partial(blackImage); int ch; while (1) { @@ -156,7 +157,7 @@ void home(UWORD *blackImage) { if (configNames[j] == NULL) { DebugLine(13, 0, "Null Config: %d\n", j); } - Paint_DrawString(5, 5 + (i * 20), configNames[i], &Font12, WHITE, BLACK); + Paint_DrawString(5, 5 + j * 20, configNames[j], &Font12, WHITE, BLACK); } EPD_2in13_V4_Display_Base(blackImage); Paint_NewImage(blackImage, EPD_2in13_V4_WIDTH, EPD_2in13_V4_HEIGHT, 0, WHITE);