dashboard gauge settings wip

This commit is contained in:
DeltaLima 2025-04-07 04:15:19 +02:00
parent e528371d09
commit 55c5dad2ee
3 changed files with 15 additions and 2 deletions

View file

@ -339,7 +339,7 @@ struct Config_Grow_Dashboard {
bool chartConfigured[Max_Dashboard_Chart];
byte chartSensor[Max_Dashboard_Chart];
byte chartRead[Max_Dashboard_Chart];
char chartColor[Max_Dashboard_Chart][7];
char chartColor[Max_Dashboard_Chart][8];
bool dataConfigured[Max_Sensors];
byte dataSensor[Max_Sensors];
byte dataRead[Max_Sensors];

View file

@ -979,6 +979,12 @@ String Proc_WebPage_grow_dashboard(const String& var) {
html += FPSTR(Sensor_Read_descr[SensorIndex[config.system.sensor.type[config.grow.dashboard.gaugeSensor[i]]].read[config.grow.dashboard.gaugeRead[i]]]);
}
html += F("</td><td>");
html += Sensor_getCalibratedValue(config.grow.dashboard.gaugeSensor[i], config.grow.dashboard.gaugeRead[i]);
html += " ";
String unit = FPSTR(Sensor_Read_unit[SensorIndex[config.system.sensor.type[config.grow.dashboard.gaugeSensor[i]]].read[config.grow.dashboard.gaugeRead[i]]]);
unit.replace(F("%"), F("&#37;"));
html += unit;
html += F("</td><td>");
// edit button
html += F("<form class='linkForm' action='/grow/dashboard/gaugeAdd' method='get'>");
html += F("<input type='hidden' name='edit' value='");
@ -1030,6 +1036,12 @@ String html;
html += F("</td><td style='background-color: ");
html += config.grow.dashboard.chartColor[i];
html += F(";'>");
//html += config.grow.dashboard.chartColor[i];
html += Sensor_getCalibratedValue(config.grow.dashboard.chartSensor[i], config.grow.dashboard.chartRead[i]);
html += " ";
String unit = FPSTR(Sensor_Read_unit[SensorIndex[config.system.sensor.type[config.grow.dashboard.chartSensor[i]]].read[config.grow.dashboard.chartRead[i]]]);
unit.replace(F("%"), F("&#37;"));
html += unit;
html += F("</td><td>");
// edit button
html += F("<form class='linkForm' action='/grow/dashboard/chartAdd' method='get'>");

View file

@ -98,6 +98,7 @@ const char Page_grow_dashboard_HTML[] PROGMEM = R"(%HEADER%
<th>ID</th>
<th>Name</th>
<th>Read</th>
<th>Value</th>
<th>&nbsp;</th>
</tr>
%TR_TD_GAUGE%
@ -111,7 +112,7 @@ const char Page_grow_dashboard_HTML[] PROGMEM = R"(%HEADER%
<th>ID</th>
<th>Name</th>
<th>Read</th>
<th>Color</th>
<th>Value</th>
<th>&nbsp;</th>
</tr>
%TR_TD_CHART%