Some C and Make magic
This commit is contained in:
11
c/src/p2fa.c
11
c/src/p2fa.c
@@ -26,11 +26,22 @@ int draw() {
|
||||
EPD_2in13_V4_Init();
|
||||
|
||||
Paint_Clear(WHITE);
|
||||
Paint_DrawString(32, 10, "Hello, World!", &Font16, WHITE, BLACK);
|
||||
|
||||
const char *confName = "default";
|
||||
GoString confStr = {confName, strlen(confName)};
|
||||
const char *code = getCode(confStr);
|
||||
Paint_DrawString(5, 5, code, &Font24, WHITE, BLACK);
|
||||
|
||||
Paint_DrawRectangle(10, 112, 240, 92, BLACK, DOT_PIXEL_1X1, DRAW_FILL_EMPTY);
|
||||
uint64_t *timeLeft = getTimeRemainingMS(30);
|
||||
for (int j = 0; j < 3; ++j) {
|
||||
for (int i = getTimeRemainingMS(30); i > 200; i = getTimeRemainingMS(30)) {
|
||||
Paint_DrawRectangle(10, 112, (timeLeft/(30*1000)) * 240, 92, BLACK, DOT_PIXEL_1X1, DRAW_FILL_FULL);
|
||||
DEV_Delay_ms(100);
|
||||
}
|
||||
}
|
||||
|
||||
DEV_Delay_ms(5000);
|
||||
|
||||
Debug("Clear...\r\n");
|
||||
|
||||
Reference in New Issue
Block a user