diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c
index 6801cefb1..aaca68b1e 100644
--- a/src/httpserver/http_fns.c
+++ b/src/httpserver/http_fns.c
@@ -394,7 +394,7 @@ int http_fn_index(http_request_t* request) {
iValue = CHANNEL_Get(i);
poststr(request, "
");
- hprintf255(request, "Temperature Channel %i value %i C ", i, iValue);
+ hprintf255(request, "Temperature Channel %s value %i C ", CHANNEL_GetLabel(i), iValue);
poststr(request, " |
");
}
@@ -404,7 +404,7 @@ int http_fn_index(http_request_t* request) {
fValue = iValue * 0.1f;
poststr(request, "");
- hprintf255(request, "Temperature Channel %i value %.2f C ", i, fValue);
+ hprintf255(request, "Temperature Channel %s value %.2f C ", CHANNEL_GetLabel(i), fValue);
poststr(request, " |
");
}
@@ -413,7 +413,7 @@ int http_fn_index(http_request_t* request) {
iValue = CHANNEL_Get(i);
poststr(request, "");
- hprintf255(request, "Humidity Channel %i value %i Percent ", i, iValue);
+ hprintf255(request, "Humidity Channel %s value %i Percent ", CHANNEL_GetLabel(i), iValue);
poststr(request, " |
");
}
@@ -423,7 +423,7 @@ int http_fn_index(http_request_t* request) {
fValue = iValue * 0.1f;
poststr(request, "");
- hprintf255(request, "Humidity Channel %i value %.2f Percent ", i, fValue);
+ hprintf255(request, "Humidity Channel %s value %.2f Percent ", CHANNEL_GetLabel(i), fValue);
poststr(request, " |
");
}
@@ -487,7 +487,7 @@ int http_fn_index(http_request_t* request) {
iValue = CHANNEL_Get(i);
poststr(request, "| ");
- hprintf255(request, " Change channel %i value: ");
@@ -499,7 +499,7 @@ int http_fn_index(http_request_t* request) {
iValue = CHANNEL_Get(i);
poststr(request, " |
| ");
- hprintf255(request, "Channel %i = %i", i, iValue);
+ hprintf255(request, "Channel %s = %i", CHANNEL_GetLabel(i), iValue);
poststr(request, " |
");
}
else if (channelType == ChType_Frequency_div100) {
@@ -507,7 +507,7 @@ int http_fn_index(http_request_t* request) {
fValue = iValue * 0.01f;
poststr(request, "| ");
- hprintf255(request, "Frequency %.2fHz (ch %i)", fValue, i);
+ hprintf255(request, "Frequency %.2fHz (ch %s)", fValue, CHANNEL_GetLabel(i));
poststr(request, " |
");
}
else if (channelType == ChType_EnergyToday_kWh_div1000) {
@@ -515,7 +515,7 @@ int http_fn_index(http_request_t* request) {
fValue = iValue * 0.001f;
poststr(request, "| ");
- hprintf255(request, "EnergyToday %.2fkWh (ch %i)", fValue, i);
+ hprintf255(request, "EnergyToday %.2fkWh (ch %s)", fValue, CHANNEL_GetLabel(i));
poststr(request, " |
");
}
else if (channelType == ChType_EnergyExport_kWh_div1000) {
@@ -523,7 +523,7 @@ int http_fn_index(http_request_t* request) {
fValue = iValue * 0.001f;
poststr(request, "| ");
- hprintf255(request, "EnergyExport(back to grid) %.2fkWh (ch %i)", fValue, i);
+ hprintf255(request, "EnergyExport(back to grid) %.2fkWh (ch %s)", fValue, CHANNEL_GetLabel(i));
poststr(request, " |
");
}
else if (channelType == ChType_EnergyTotal_kWh_div1000) {
@@ -531,7 +531,7 @@ int http_fn_index(http_request_t* request) {
fValue = iValue * 0.001f;
poststr(request, "| ");
- hprintf255(request, "EnergyTotal %.2fkWh (ch %i)", fValue, i);
+ hprintf255(request, "EnergyTotal %.2fkWh (ch %s)", fValue, CHANNEL_GetLabel(i));
poststr(request, " |
");
}
else if (channelType == ChType_EnergyTotal_kWh_div100) {
@@ -539,7 +539,7 @@ int http_fn_index(http_request_t* request) {
fValue = iValue * 0.01f;
poststr(request, "| ");
- hprintf255(request, "EnergyTotal %.2fkWh (ch %i)", fValue, i);
+ hprintf255(request, "EnergyTotal %.2fkWh (ch %s)", fValue, CHANNEL_GetLabel(i));
poststr(request, " |
");
}
else if (channelType == ChType_Voltage_div10) {
@@ -547,21 +547,21 @@ int http_fn_index(http_request_t* request) {
fValue = iValue * 0.1f;
poststr(request, "| ");
- hprintf255(request, "Voltage %.2fV (ch %i)", fValue, i);
+ hprintf255(request, "Voltage %.2fV (ch %s)", fValue, CHANNEL_GetLabel(i));
poststr(request, " |
");
}
else if (channelType == ChType_ReactivePower) {
iValue = CHANNEL_Get(i);
poststr(request, "| ");
- hprintf255(request, "ReactivePower %iVAr (ch %i)", iValue, i);
+ hprintf255(request, "ReactivePower %iVAr (ch %s)", iValue, CHANNEL_GetLabel(i));
poststr(request, " |
");
}
else if (channelType == ChType_Power) {
iValue = CHANNEL_Get(i);
poststr(request, "| ");
- hprintf255(request, "Power %iW (ch %i)", iValue, i);
+ hprintf255(request, "Power %iW (ch %s)", iValue, CHANNEL_GetLabel(i));
poststr(request, " |
");
}
else if (channelType == ChType_PowerFactor_div1000) {
@@ -577,7 +577,7 @@ int http_fn_index(http_request_t* request) {
fValue = iValue * 0.01f;
poststr(request, "| ");
- hprintf255(request, "Current %.2fA (ch %i)", fValue, i);
+ hprintf255(request, "Current %.2fA (ch %s)", fValue, CHANNEL_GetLabel(i));
poststr(request, " |
");
}
else if (channelType == ChType_Current_div1000) {
@@ -585,7 +585,7 @@ int http_fn_index(http_request_t* request) {
fValue = iValue * 0.001f;
poststr(request, "| ");
- hprintf255(request, "Current %.2fA (ch %i)", fValue, i);
+ hprintf255(request, "Current %.2fA (ch %s)", fValue, CHANNEL_GetLabel(i));
poststr(request, " |
");
}
else if (channelType == ChType_BatteryLevelPercent) {