From d3e09b0887664ac63c58d26e9911cc1e7b9e1c40 Mon Sep 17 00:00:00 2001 From: Eric Fontaine Date: Fri, 24 Sep 2021 09:36:40 -0400 Subject: [PATCH] updateConfig when move sliders too (#145) onchange only would trigger updateConfig when user releases the mouse from sliders. Adding oninput also allows updateConfig when dragging the sliders, which provides immediate feedback of the changes for the user. --- index_other.h | 5 +++++ index_ov2640.h | 5 +++++ index_ov3660.h | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/index_other.h b/index_other.h index 71b6971..a5a6231 100644 --- a/index_other.h +++ b/index_other.h @@ -258,6 +258,11 @@ const uint8_t index_simple_html[] = R"=====( .forEach(el => { el.onchange = () => updateConfig(el) }) + document + .querySelectorAll('input[type="range"]') + .forEach(el => { + el.oninput = () => updateConfig(el) + }) // Custom actions // Detection and framesize diff --git a/index_ov2640.h b/index_ov2640.h index 00724cf..f202ec7 100644 --- a/index_ov2640.h +++ b/index_ov2640.h @@ -498,6 +498,11 @@ const uint8_t index_ov2640_html[] = R"=====( .forEach(el => { el.onchange = () => updateConfig(el) }) + document + .querySelectorAll('input[type="range"]') + .forEach(el => { + el.oninput = () => updateConfig(el) + }) // Custom actions // Gain diff --git a/index_ov3660.h b/index_ov3660.h index ff4b88d..ca963c7 100644 --- a/index_ov3660.h +++ b/index_ov3660.h @@ -510,6 +510,11 @@ const uint8_t index_ov3660_html[] = R"=====( .forEach(el => { el.onchange = () => updateConfig(el) }) + document + .querySelectorAll('input[type="range"]') + .forEach(el => { + el.oninput = () => updateConfig(el) + }) // Custom actions // Gain