mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-25 20:26:41 +00:00
Minor changes
This commit is contained in:
parent
15380386bc
commit
f5c8f98f9e
2
lib/lvgl
2
lib/lvgl
@ -1 +1 @@
|
|||||||
Subproject commit d09924706048d3ac3fb8dc35f826405f65f07bb7
|
Subproject commit 15ba2203bee705f95b7df056cad14ef94be927f6
|
25
src/hasp.cpp
25
src/hasp.cpp
@ -403,22 +403,32 @@ void haspSetup()
|
|||||||
/* ********** Theme Initializations ********** */
|
/* ********** Theme Initializations ********** */
|
||||||
lv_theme_t * th;
|
lv_theme_t * th;
|
||||||
switch(haspThemeId) {
|
switch(haspThemeId) {
|
||||||
|
#if(LV_USE_THEME_EMPTY == 1)
|
||||||
|
case 0:
|
||||||
|
th = lv_theme_empty_init(LV_COLOR_PURPLE, LV_COLOR_BLACK, LV_THEME_DEFAULT_FLAGS, defaultFont, defaultFont,
|
||||||
|
defaultFont, defaultFont);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if LV_USE_THEME_ALIEN == 1
|
#if LV_USE_THEME_ALIEN == 1
|
||||||
case 1:
|
case 1:
|
||||||
th = lv_theme_alien_init(haspThemeHue, defaultFont);
|
th = lv_theme_alien_init(haspThemeHue, defaultFont);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_THEME_NIGHT == 1
|
#if LV_USE_THEME_NIGHT == 1
|
||||||
case 2:
|
case 2:
|
||||||
th = lv_theme_night_init(haspThemeHue, defaultFont); // heavy
|
th = lv_theme_night_init(haspThemeHue, defaultFont); // heavy
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if(LV_USE_THEME_MONO == 1) || (LV_USE_THEME_EMPTY == 1)
|
|
||||||
|
#if(LV_USE_THEME_MONO == 1)
|
||||||
case 3:
|
case 3:
|
||||||
th = lv_theme_empty_init(LV_COLOR_PURPLE, LV_COLOR_BLACK, LV_THEME_DEFAULT_FLAGS, defaultFont, defaultFont,
|
th = lv_theme_mono_init(LV_COLOR_PURPLE, LV_COLOR_BLACK, LV_THEME_DEFAULT_FLAGS, defaultFont, defaultFont,
|
||||||
defaultFont, defaultFont);
|
defaultFont, defaultFont);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_THEME_MATERIAL == 1
|
#if LV_USE_THEME_MATERIAL == 1
|
||||||
case 4:
|
case 4:
|
||||||
th = lv_theme_material_init(LV_COLOR_PURPLE, LV_COLOR_ORANGE, LV_THEME_DEFAULT_FLAGS, defaultFont,
|
th = lv_theme_material_init(LV_COLOR_PURPLE, LV_COLOR_ORANGE, LV_THEME_DEFAULT_FLAGS, defaultFont,
|
||||||
@ -430,23 +440,28 @@ void haspSetup()
|
|||||||
case 5:
|
case 5:
|
||||||
th = lv_theme_zen_init(haspThemeHue, defaultFont); // lightweight break;
|
th = lv_theme_zen_init(haspThemeHue, defaultFont); // lightweight break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_THEME_NEMO == 1
|
#if LV_USE_THEME_NEMO == 1
|
||||||
case 6:
|
case 6:
|
||||||
th =
|
th =
|
||||||
// lv_theme_nemo_init(haspThemeHue, defaultFont); // heavy
|
// lv_theme_nemo_init(haspThemeHue, defaultFont); // heavy
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if LV_USE_THEME_TEMPL == 1
|
|
||||||
|
#if LV_USE_THEME_TEMPLATE == 1
|
||||||
case 7:
|
case 7:
|
||||||
th = lv_theme_templ_init(haspThemeHue, defaultFont); // lightweight, not for production...
|
th = lv_theme_template_init(LV_COLOR_PURPLE, LV_COLOR_ORANGE, LV_THEME_DEFAULT_FLAGS, defaultFont,
|
||||||
|
defaultFont, defaultFont, defaultFont);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if(LV_USE_THEME_HASP == 1) || (LV_USE_THEME_TEMPLATE == 1)
|
#if(LV_USE_THEME_HASP == 1) || (LV_USE_THEME_TEMPLATE == 1)
|
||||||
case 8:
|
case 8:
|
||||||
th = lv_theme_template_init(LV_COLOR_PURPLE, LV_COLOR_ORANGE, LV_THEME_DEFAULT_FLAGS, defaultFont,
|
th = lv_theme_template_init(LV_COLOR_PURPLE, LV_COLOR_ORANGE, LV_THEME_DEFAULT_FLAGS, defaultFont,
|
||||||
defaultFont, defaultFont, defaultFont);
|
defaultFont, defaultFont, defaultFont);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* case 0:
|
/* case 0:
|
||||||
#if LV_USE_THEME_DEFAULT == 1
|
#if LV_USE_THEME_DEFAULT == 1
|
||||||
th = lv_theme_default_init(haspThemeHue, defaultFont);
|
th = lv_theme_default_init(haspThemeHue, defaultFont);
|
||||||
|
@ -51,7 +51,7 @@ char httpPassword[32] = "";
|
|||||||
EthernetWebServer webServer(80);
|
EthernetWebServer webServer(80);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(STM32F4xx) && HASP_USE_WIFI>0
|
#if defined(STM32F4xx) && HASP_USE_WIFI > 0
|
||||||
#include <EthernetWebServer_STM32.h>
|
#include <EthernetWebServer_STM32.h>
|
||||||
// #include <WiFi.h>
|
// #include <WiFi.h>
|
||||||
EthernetWebServer webServer(80);
|
EthernetWebServer webServer(80);
|
||||||
@ -853,7 +853,7 @@ void handleFileList()
|
|||||||
output += "]";
|
output += "]";
|
||||||
webServer.send(200, PSTR("text/json"), output);
|
webServer.send(200, PSTR("text/json"), output);
|
||||||
#elif defined(ARDUINO_ARCH_ESP8266)
|
#elif defined(ARDUINO_ARCH_ESP8266)
|
||||||
Dir dir = filesystem->openDir(path);
|
Dir dir = filesystem->openDir(path);
|
||||||
String output = "[";
|
String output = "[";
|
||||||
while(dir.next()) {
|
while(dir.next()) {
|
||||||
File entry = dir.openFile("r");
|
File entry = dir.openFile("r");
|
||||||
@ -1367,6 +1367,9 @@ void webHandleHaspConfig()
|
|||||||
uint8_t themeid = settings[FPSTR(F_CONFIG_THEME)].as<uint8_t>();
|
uint8_t themeid = settings[FPSTR(F_CONFIG_THEME)].as<uint8_t>();
|
||||||
httpMessage += getOption(0, F("Built-in"), themeid == 0);
|
httpMessage += getOption(0, F("Built-in"), themeid == 0);
|
||||||
httpMessage += getOption(8, F("Hasp"), themeid == 8);
|
httpMessage += getOption(8, F("Hasp"), themeid == 8);
|
||||||
|
#if LV_USE_THEME_EMPTY == 1
|
||||||
|
httpMessage += getOption(0, F("Empty"), themeid == 0);
|
||||||
|
#endif
|
||||||
#if LV_USE_THEME_ALIEN == 1
|
#if LV_USE_THEME_ALIEN == 1
|
||||||
httpMessage += getOption(1, F("Alien"), themeid == 1);
|
httpMessage += getOption(1, F("Alien"), themeid == 1);
|
||||||
#endif
|
#endif
|
||||||
@ -1385,7 +1388,7 @@ void webHandleHaspConfig()
|
|||||||
#if LV_USE_THEME_NEMO == 1
|
#if LV_USE_THEME_NEMO == 1
|
||||||
httpMessage += getOption(6, F("Nemo"), themeid == 6);
|
httpMessage += getOption(6, F("Nemo"), themeid == 6);
|
||||||
#endif
|
#endif
|
||||||
#if LV_USE_THEME_TEMPL == 1
|
#if LV_USE_THEME_TEMPLATE == 1
|
||||||
httpMessage += getOption(7, F("Template"), themeid == 7);
|
httpMessage += getOption(7, F("Template"), themeid == 7);
|
||||||
#endif
|
#endif
|
||||||
httpMessage += F("</select></br>");
|
httpMessage += F("</select></br>");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user