From 098a6ab7f609eb9c7623c804350b46c423bccd1e Mon Sep 17 00:00:00 2001 From: openshwprojects Date: Sat, 29 Apr 2023 19:18:29 +0200 Subject: [PATCH] correct too low precision display --- src/httpserver/http_fns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 9c292242b..357fdb0db 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -569,7 +569,7 @@ int http_fn_index(http_request_t* request) { fValue = iValue * 0.01f; poststr(request, ""); - hprintf255(request, "Current %.2fA (ch %s)", fValue, CHANNEL_GetLabel(i)); + hprintf255(request, "Current %.3fA (ch %s)", fValue, CHANNEL_GetLabel(i)); poststr(request, ""); } else if (channelType == ChType_Current_div1000) { @@ -577,7 +577,7 @@ int http_fn_index(http_request_t* request) { fValue = iValue * 0.001f; poststr(request, ""); - hprintf255(request, "Current %.2fA (ch %s)", fValue, CHANNEL_GetLabel(i)); + hprintf255(request, "Current %.4fA (ch %s)", fValue, CHANNEL_GetLabel(i)); poststr(request, ""); } else if (channelType == ChType_BatteryLevelPercent) {