Proper API usage again?
This commit is contained in:
parent
c98c10f72f
commit
f9bf3b97b4
@ -33,11 +33,9 @@ int draw() {
|
||||
return -1;
|
||||
}
|
||||
Paint_NewImage(BlackImage, EPD_2in13_V4_WIDTH, EPD_2in13_V4_HEIGHT, 90, WHITE);
|
||||
|
||||
EPD_2in13_V4_Init();
|
||||
Paint_SelectImage(BlackImage);
|
||||
Paint_Clear(WHITE);
|
||||
|
||||
Paint_SelectImage(BlackImage)
|
||||
Paint_DrawString(32, 10, "Hello, World!", &Font16, WHITE, BLACK);
|
||||
|
||||
const char *confName = "default";
|
||||
@ -47,10 +45,13 @@ int draw() {
|
||||
Paint_DrawString(5, 5, code, &Font24, WHITE, BLACK);
|
||||
|
||||
Paint_DrawRectangle(10, 112, 240, 92, BLACK, DOT_PIXEL_1X1, DRAW_FILL_EMPTY);
|
||||
EPD_2in13_V4_Display_Base(BlackImage);
|
||||
|
||||
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);
|
||||
EPD_2in13_V4_Display_Partial(BlackImage);
|
||||
DEV_Delay_ms(100);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user