Skip to content

Commit

Permalink
Add max fps control in full index page for ovh2640.
Browse files Browse the repository at this point in the history
  • Loading branch information
15498th committed Dec 16, 2021
1 parent 158575a commit 1cda0e2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions index_ov2640.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,20 @@ const uint8_t index_ov2640_html[] = R"=====(<!doctype html>
<label class="slider" for="colorbar"></label>
</div>
</div>
<div class="input-group" id="framerate_limit-group">
<label for="framerate_limit">FPS Limit</label>
<select id="framerate_limit" class="default-action">
<option value="3333">0.3</option>
<option value="2000">0.5</option>
<option value="1000">1</option>
<option value="500">2</option>
<option value="333">3</option>
<option value="200">5</option>
<option value="100">10</option>
<option value="50">20</option>
<option value="0" selected="selected">Disabled</option>
</select>
</div>
<div class="input-group" id="preferences-group">
<label for="reboot" style="line-height: 2em;">Preferences</label>
<button id="reboot" title="Reboot the camera module">Reboot</button>
Expand Down Expand Up @@ -296,6 +310,7 @@ const uint8_t index_ov2640_html[] = R"=====(<!doctype html>
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')
Expand Down Expand Up @@ -359,6 +374,8 @@ const uint8_t index_ov2640_html[] = R"=====(<!doctype html>
} 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';
Expand Down Expand Up @@ -562,6 +579,10 @@ const uint8_t index_ov2640_html[] = R"=====(<!doctype html>
updateConfig(framesize)
}

framerateLimit.onchange = () => {
updateConfig(framerateLimit)
}

swapButton.onclick = () => {
window.open('/?view=simple','_self');
}
Expand Down

0 comments on commit 1cda0e2

Please sign in to comment.