latest map style

Signed-off-by: Peter Siegmund <peter@rdkr.com>
This commit is contained in:
Peter Siegmund
2024-06-06 10:10:18 +02:00
parent 1704a17833
commit 41492c07c9
7 changed files with 550 additions and 1108 deletions

View File

@@ -4,13 +4,15 @@
#include "epd_driver.h"
#include "smartconfig.h"
#include "staticmap.h"
#include "utilities.h"
uint8_t* framebuffer;
void setup(void) {
epd_init();
epd_poweron();
epd_clear();
epd_poweroff();
framebuffer =
(uint8_t*)heap_caps_malloc(EPD_WIDTH * EPD_HEIGHT / 2, MALLOC_CAP_SPIRAM);
@@ -23,17 +25,6 @@ void setup(void) {
memset(framebuffer, 0xFF, EPD_WIDTH * EPD_HEIGHT / 2);
int32_t width = staticmap_width;
int32_t height = staticmap_height;
const uint8_t* data = staticmap_data;
Rect_t area = {
.x = EPD_WIDTH - width, .y = 0, .width = width, .height = height};
epd_poweron();
epd_clear();
epd_draw_image(area, (uint8_t*)data, BLACK_ON_WHITE);
epd_poweroff();
init_smartconfig();
}