fixing dashboard data stuff
This commit is contained in:
parent
197b0691a4
commit
002f3cdd63
3 changed files with 6 additions and 6 deletions
include
|
@ -456,7 +456,7 @@ bool LoadConfig() {
|
|||
}
|
||||
|
||||
/* iterate through data */
|
||||
for(byte i = 0; i < Max_Sensors; i++) {
|
||||
for(byte i = 0; i < Max_Dashboard_Data; i++) {
|
||||
if(objDashboard.containsKey("dataConfigured"))
|
||||
config.grow.dashboard.dataConfigured[i] = objDashboard["dataConfigured"][i];
|
||||
if(config.grow.dashboard.dataConfigured[i] == true) {
|
||||
|
@ -671,7 +671,7 @@ bool SaveConfig(bool writeToSerial = false) {
|
|||
}
|
||||
|
||||
/* iterate through data */
|
||||
for(byte i = 0; i < Max_Sensors; i++) {
|
||||
for(byte i = 0; i < Max_Dashboard_Data; i++) {
|
||||
if(config.grow.dashboard.dataConfigured[i] == true) {
|
||||
objDashboard["dataConfigured"][i] = config.grow.dashboard.dataConfigured[i];
|
||||
objDashboard["dataSensor"][i] = config.grow.dashboard.dataSensor[i];
|
||||
|
|
|
@ -105,7 +105,7 @@ void Webserver_Init() {
|
|||
|
||||
|
||||
/* DEBUG only - offer config for direct download */
|
||||
#ifndef DEBUG
|
||||
#ifdef DEBUG
|
||||
webserver.serveStatic(CANGROW_CFG, LittleFS, CANGROW_CFG);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -964,7 +964,7 @@ String Proc_WebPage_grow_dashboard(const String& var) {
|
|||
} else if(Test_WebPage_grow_SUBNAV(var)) {
|
||||
return Proc_WebPage_grow_SUBNAV(var, WEB_GROW_SUBNAV_DASHBOARD);
|
||||
}
|
||||
/* else if(var == "ADD_DISABLED_GAUGE") {
|
||||
else if(var == "ADD_DISABLED_GAUGE") {
|
||||
if(Give_Free_Dashboard_GaugeId() > Max_Dashboard_Gauge ) {
|
||||
return F("disabled force_hide");
|
||||
} else {
|
||||
|
@ -977,13 +977,13 @@ String Proc_WebPage_grow_dashboard(const String& var) {
|
|||
return String();
|
||||
}
|
||||
} else if(var == "ADD_DISABLED_DATA") {
|
||||
if(Give_Free_Dashboard_ChartId() > Max_Dashboard_Chart ) {
|
||||
if(Give_Free_Dashboard_DataId() > Max_Dashboard_Data ) {
|
||||
return F("disabled force_hide");
|
||||
} else {
|
||||
return String();
|
||||
}
|
||||
}
|
||||
WTF CAUSES THIS BLOCK A CRASH??!?! When i delete the last one "ADD_DISABLED_SCHNUSEL", then it dont crash - LOLWTF?!
|
||||
/* WTF CAUSES THIS BLOCK A CRASH??!?! When i delete the last one "ADD_DISABLED_SCHNUSEL", then it dont crash - LOLWTF?!
|
||||
* OOM maybe? I cant read the exception atm
|
||||
* :: [WiFi:Init]
|
||||
:: [WiFi:Connect] connecting to SSID: MyFancyWifi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue