From 1cda0e2ef71ae46fa9c0768c07b644c10c914020 Mon Sep 17 00:00:00 2001 From: 15498th Date: Fri, 17 Dec 2021 00:15:01 +0300 Subject: [PATCH] Add max fps control in full index page for ovh2640. --- index_ov2640.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/index_ov2640.h b/index_ov2640.h index f923a21..49a4980 100644 --- a/index_ov2640.h +++ b/index_ov2640.h @@ -237,6 +237,20 @@ const uint8_t index_ov2640_html[] = R"=====( +
+ + +
@@ -296,6 +310,7 @@ const uint8_t index_ov2640_html[] = R"=====( const savePrefsButton = document.getElementById('save_prefs') const clearPrefsButton = document.getElementById('clear_prefs') const rebootButton = document.getElementById('reboot') + const framerateLimit = document.getElementById('framerate_limit') const hide = el => { el.classList.add('hidden') @@ -359,6 +374,8 @@ const uint8_t index_ov2640_html[] = R"=====( } else if(el.id === "rotate"){ rotate.value = value; applyRotation(); + } else if(el.id === "framerate_limit"){ + framerate_limit.value = value; } else if(el.id === "stream_url"){ streamURL = value; viewerURL = value + 'view'; @@ -562,6 +579,10 @@ const uint8_t index_ov2640_html[] = R"=====( updateConfig(framesize) } + framerateLimit.onchange = () => { + updateConfig(framerateLimit) + } + swapButton.onclick = () => { window.open('/?view=simple','_self'); }