Minor changes

This commit is contained in:
fvanroie 2020-05-29 14:54:15 +02:00
parent 15380386bc
commit f5c8f98f9e
3 changed files with 27 additions and 9 deletions

@ -1 +1 @@
Subproject commit d09924706048d3ac3fb8dc35f826405f65f07bb7
Subproject commit 15ba2203bee705f95b7df056cad14ef94be927f6

View File

@ -403,22 +403,32 @@ void haspSetup()
/* ********** Theme Initializations ********** */
lv_theme_t * th;
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
case 1:
th = lv_theme_alien_init(haspThemeHue, defaultFont);
break;
#endif
#if LV_USE_THEME_NIGHT == 1
case 2:
th = lv_theme_night_init(haspThemeHue, defaultFont); // heavy
break;
#endif
#if(LV_USE_THEME_MONO == 1) || (LV_USE_THEME_EMPTY == 1)
#if(LV_USE_THEME_MONO == 1)
case 3:
th = lv_theme_empty_init(LV_COLOR_PURPLE, LV_COLOR_BLACK, LV_THEME_DEFAULT_FLAGS, defaultFont, defaultFont,
defaultFont, defaultFont);
th = lv_theme_mono_init(LV_COLOR_PURPLE, LV_COLOR_BLACK, LV_THEME_DEFAULT_FLAGS, defaultFont, defaultFont,
defaultFont, defaultFont);
break;
#endif
#if LV_USE_THEME_MATERIAL == 1
case 4:
th = lv_theme_material_init(LV_COLOR_PURPLE, LV_COLOR_ORANGE, LV_THEME_DEFAULT_FLAGS, defaultFont,
@ -430,23 +440,28 @@ void haspSetup()
case 5:
th = lv_theme_zen_init(haspThemeHue, defaultFont); // lightweight break;
#endif
#if LV_USE_THEME_NEMO == 1
case 6:
th =
// lv_theme_nemo_init(haspThemeHue, defaultFont); // heavy
break;
#endif
#if LV_USE_THEME_TEMPL == 1
#if LV_USE_THEME_TEMPLATE == 1
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;
#endif
#if(LV_USE_THEME_HASP == 1) || (LV_USE_THEME_TEMPLATE == 1)
case 8:
th = lv_theme_template_init(LV_COLOR_PURPLE, LV_COLOR_ORANGE, LV_THEME_DEFAULT_FLAGS, defaultFont,
defaultFont, defaultFont, defaultFont);
break;
#endif
/* case 0:
#if LV_USE_THEME_DEFAULT == 1
th = lv_theme_default_init(haspThemeHue, defaultFont);

View File

@ -51,7 +51,7 @@ char httpPassword[32] = "";
EthernetWebServer webServer(80);
#endif
#if defined(STM32F4xx) && HASP_USE_WIFI>0
#if defined(STM32F4xx) && HASP_USE_WIFI > 0
#include <EthernetWebServer_STM32.h>
// #include <WiFi.h>
EthernetWebServer webServer(80);
@ -853,7 +853,7 @@ void handleFileList()
output += "]";
webServer.send(200, PSTR("text/json"), output);
#elif defined(ARDUINO_ARCH_ESP8266)
Dir dir = filesystem->openDir(path);
Dir dir = filesystem->openDir(path);
String output = "[";
while(dir.next()) {
File entry = dir.openFile("r");
@ -1367,6 +1367,9 @@ void webHandleHaspConfig()
uint8_t themeid = settings[FPSTR(F_CONFIG_THEME)].as<uint8_t>();
httpMessage += getOption(0, F("Built-in"), themeid == 0);
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
httpMessage += getOption(1, F("Alien"), themeid == 1);
#endif
@ -1385,7 +1388,7 @@ void webHandleHaspConfig()
#if LV_USE_THEME_NEMO == 1
httpMessage += getOption(6, F("Nemo"), themeid == 6);
#endif
#if LV_USE_THEME_TEMPL == 1
#if LV_USE_THEME_TEMPLATE == 1
httpMessage += getOption(7, F("Template"), themeid == 7);
#endif
httpMessage += F("</select></br>");