From e67d6f8d507e9b532080b2f0d3dc3550ba9dc662 Mon Sep 17 00:00:00 2001 From: Steffen Pohle Date: Fri, 6 Feb 2026 20:57:07 +0100 Subject: [PATCH] fixed float images in convert --- convert.cc | 12 ++++++------ webserver.cc | 1 - www/index.html | 6 ++++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/convert.cc b/convert.cc index 950e071..62c2eb2 100644 --- a/convert.cc +++ b/convert.cc @@ -153,7 +153,7 @@ int Convert (ConvertData *cdata, VideoFrame *dest, VideoFrameFloat *destf, unsig *(ptrdst++) = g; *(ptrdst++) = b; } - else { + if (ptrdstf) { *(ptrdstf++) = (float)r/255.0; *(ptrdstf++) = (float)g/255.0; *(ptrdstf++) = (float)b/255.0; @@ -188,7 +188,7 @@ int Convert (ConvertData *cdata, VideoFrame *dest, VideoFrameFloat *destf, unsig *(ptrdst++) = g; *(ptrdst++) = b; } - else { + if (ptrdstf) { *(ptrdstf++) = (float)r/255.0; *(ptrdstf++) = (float)g/255.0; *(ptrdstf++) = (float)b/255.0; @@ -221,7 +221,7 @@ int Convert (ConvertData *cdata, VideoFrame *dest, VideoFrameFloat *destf, unsig *(ptrdst++) = g; *(ptrdst++) = b; } - else { + if (ptrdstf) { *(ptrdstf++) = (float)r/255.0; *(ptrdstf++) = (float)g/255.0; *(ptrdstf++) = (float)b/255.0; @@ -255,7 +255,7 @@ int Convert (ConvertData *cdata, VideoFrame *dest, VideoFrameFloat *destf, unsig *(ptrdst++) = g; *(ptrdst++) = b; } - else { + if (ptrdstf) { *(ptrdstf++) = (float)r/255.0; *(ptrdstf++) = (float)g/255.0; *(ptrdstf++) = (float)b/255.0; @@ -322,7 +322,7 @@ int Convert (ConvertData *cdata, VideoFrame *dest, VideoFrameFloat *destf, unsig *(ptrdst++) = g; *(ptrdst++) = b; } - else { + if (ptrdstf) { *(ptrdstf++) = (float)r/255.0; *(ptrdstf++) = (float)g/255.0; *(ptrdstf++) = (float)b/255.0; @@ -365,7 +365,7 @@ int Convert (ConvertData *cdata, VideoFrame *dest, VideoFrameFloat *destf, unsig *(ptrdst++) = g; *(ptrdst++) = b; } - else { + if (ptrdstf) { *(ptrdstf++) = (float)r/255.0; *(ptrdstf++) = (float)g/255.0; *(ptrdstf++) = (float)b/255.0; diff --git a/webserver.cc b/webserver.cc index f1e4a00..a883979 100644 --- a/webserver.cc +++ b/webserver.cc @@ -116,7 +116,6 @@ std::string API_Set_Ctrl(std::string request) { while ((t = strchr (t, '/'))) { i++; t++; - printf ("%d %s\n", i, t); if (i == 3) { char *v = strchr (t, '='); id = atol (t); diff --git a/www/index.html b/www/index.html index 785a038..f6f860d 100644 --- a/www/index.html +++ b/www/index.html @@ -92,9 +92,11 @@ function refreshVariables() { variables = JSON.parse(response); let table = document.getElementById("variables"); - let t = ""; + let t = "NameValueDescription"; variables.variables.forEach(function (elm, idx) { - t += ""+elm.name+""; + t += ""+elm.name+""+ + ""+ + ""+elm.desc+""; }); t += ""; table.innerHTML = t;