dashboard gauge settings wip

This commit is contained in:
DeltaLima 2025-04-07 03:30:32 +02:00
parent 5415e7df91
commit a153501e13

View file

@ -971,7 +971,13 @@ String Proc_WebPage_grow_dashboard(const String& var) {
html += F("</td><td>");
html += config.system.sensor.name[config.grow.dashboard.gaugeSensor[i]];
html += F("</td><td>");
html += FPSTR(Sensor_Read_descr[SensorIndex[config.system.sensor.type[config.grow.dashboard.gaugeSensor[i]]].read[config.grow.dashboard.gaugeRead[i]]]);
//html += FPSTR(Sensor_Read_descr[SensorIndex[config.system.sensor.type[config.grow.dashboard.gaugeSensor[i]]].read[config.grow.dashboard.gaugeRead[i]]]);
/* when RAW convert is set, use this for description. Otherwise use RAW*/
if((SensorIndex[config.system.sensor.type[config.grow.dashboard.gaugeSensor[i]]].read[config.grow.dashboard.gaugeRead[i]] == SENSOR_READ_TYPE_RAW) && (config.system.sensor.rawConvert[config.grow.dashboard.gaugeSensor[i]][config.grow.dashboard.gaugeRead[i]] > 0)) {
html += FPSTR(Sensor_Convert_Raw_descr[config.system.sensor.rawConvert[config.grow.dashboard.gaugeSensor[i]][config.grow.dashboard.gaugeRead[i]]]);
} else {
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>");
// edit button
html += F("<form class='linkForm' action='/grow/dashboard/gaugeAdd' method='get'>");
@ -988,7 +994,16 @@ String Proc_WebPage_grow_dashboard(const String& var) {
html += F("gauge for ");
html += config.system.sensor.name[config.grow.dashboard.gaugeSensor[i]];
html += F(" ");
html += FPSTR(Sensor_Read_descr[SensorIndex[config.system.sensor.type[config.grow.dashboard.gaugeSensor[i]]].read[config.grow.dashboard.gaugeRead[i]]]);
//html += FPSTR(Sensor_Read_descr[SensorIndex[config.system.sensor.type[config.grow.dashboard.gaugeSensor[i]]].read[config.grow.dashboard.gaugeRead[i]]]);
/* when RAW convert is set, use this for description. Otherwise use RAW*/
if((SensorIndex[config.system.sensor.type[config.grow.dashboard.gaugeSensor[i]]].read[config.grow.dashboard.gaugeRead[i]] == SENSOR_READ_TYPE_RAW) && (config.system.sensor.rawConvert[config.grow.dashboard.gaugeSensor[i]][config.grow.dashboard.gaugeRead[i]] > 0)) {
html += FPSTR(Sensor_Convert_Raw_descr[config.system.sensor.rawConvert[config.grow.dashboard.gaugeSensor[i]][config.grow.dashboard.gaugeRead[i]]]);
} else {
html += FPSTR(Sensor_Read_descr[SensorIndex[config.system.sensor.type[config.grow.dashboard.gaugeSensor[i]]].read[config.grow.dashboard.gaugeRead[i]]]);
}
html += F("')\" title='Delete'></form>");
html += F("</td></tr>");
}