mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-26 20:56:37 +00:00
Add touch pointer
This commit is contained in:
parent
a843236184
commit
523bdc3fcc
@ -611,7 +611,7 @@ void guiSetup()
|
|||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
LV_IMG_DECLARE(mouse_cursor_icon); /*Declare the image file.*/
|
LV_IMG_DECLARE(mouse_cursor_icon); /*Declare the image file.*/
|
||||||
cursor = lv_img_create(mouse_layer, NULL); /*Create an image object for the cursor */
|
cursor = lv_img_create(mouse_layer, NULL); /*Create an image object for the cursor */
|
||||||
lv_img_set_src(cursor_obj, &mouse_cursor_icon); /*Set the image source*/
|
lv_img_set_src(cursor, &mouse_cursor_icon); /*Set the image source*/
|
||||||
#else
|
#else
|
||||||
cursor = lv_obj_create(mouse_layer, NULL); // show cursor object on every page
|
cursor = lv_obj_create(mouse_layer, NULL); // show cursor object on every page
|
||||||
lv_obj_set_size(cursor, 9, 9);
|
lv_obj_set_size(cursor, 9, 9);
|
||||||
|
@ -294,23 +294,12 @@ void webHandleScreenshot()
|
|||||||
{ // http://plate01/screenshot
|
{ // http://plate01/screenshot
|
||||||
if(!httpIsAuthenticated(F("screenshot"))) return;
|
if(!httpIsAuthenticated(F("screenshot"))) return;
|
||||||
|
|
||||||
if(webServer.hasArg(F("a")) && webServer.arg(F("a")) == F("next")) {
|
if(webServer.hasArg(F("a"))) {
|
||||||
uint8_t page = haspGetPage();
|
if(webServer.arg(F("a")) == F("next")) {
|
||||||
if(page + 1 >= HASP_NUM_PAGES) {
|
dispatchPageNext();
|
||||||
page = 0;
|
} else if(webServer.arg(F("a")) == F("prev")) {
|
||||||
} else {
|
dispatchPagePrev();
|
||||||
page++;
|
|
||||||
}
|
}
|
||||||
haspSetPage(page);
|
|
||||||
}
|
|
||||||
if(webServer.hasArg(F("a")) && webServer.arg(F("a")) == F("prev")) {
|
|
||||||
uint8_t page = haspGetPage();
|
|
||||||
if(page == 0) {
|
|
||||||
page = HASP_NUM_PAGES - 1;
|
|
||||||
} else {
|
|
||||||
page--;
|
|
||||||
}
|
|
||||||
haspSetPage(page);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(webServer.hasArg(F("q"))) {
|
if(webServer.hasArg(F("q"))) {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
#include "Arduino.h"
|
||||||
#include "lvgl.h"
|
#include "lvgl.h"
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
|
||||||
|
#if 1
|
||||||
const uint8_t mouse_cursor_icon_map[] = {
|
const uint8_t mouse_cursor_icon_map[] = {
|
||||||
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
|
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
|
||||||
/*Pixel format: Alpha 8 bit, Red: 3 bit, Green: 3 bit, Blue: 2 bit*/
|
/*Pixel format: Alpha 8 bit, Red: 3 bit, Green: 3 bit, Blue: 2 bit*/
|
||||||
|
@ -10,6 +10,7 @@ platform = espressif8266@^2.6.2
|
|||||||
board = d1_mini
|
board = d1_mini
|
||||||
;upload_port = COM7 ; To change the port, use platform_override.ini
|
;upload_port = COM7 ; To change the port, use platform_override.ini
|
||||||
;monitor_port = COM7 ; To change the port, use platform_override.ini
|
;monitor_port = COM7 ; To change the port, use platform_override.ini
|
||||||
|
monitor_filters = esp8266_exception_decoder
|
||||||
board_build.f_flash = 40000000L
|
board_build.f_flash = 40000000L
|
||||||
board_build.flash_mode = dout
|
board_build.flash_mode = dout
|
||||||
board_build.ldscript = eagle.flash.4m2m.ld ; 2Mb Spiffs
|
board_build.ldscript = eagle.flash.4m2m.ld ; 2Mb Spiffs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user