new map and starting smart config
Signed-off-by: Peter Siegmund <peter@rdkr.com>
This commit is contained in:
24
ePaper-ESP-IDF/components/mapView/mapView.cpp
Normal file
24
ePaper-ESP-IDF/components/mapView/mapView.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "mapView.h"
|
||||
|
||||
#include <esp_task_wdt.h>
|
||||
|
||||
#include "epd_driver.h"
|
||||
#include "staticmap.h"
|
||||
#include "utilities.h"
|
||||
|
||||
void mapView(void* args) {
|
||||
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();
|
||||
|
||||
while (1) {
|
||||
vTaskDelay(pdMS_TO_TICKS(100));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user