Skip to content

Commit

Permalink
Add max fps control for ov3660 index page.
Browse files Browse the repository at this point in the history
  • Loading branch information
15498th committed Dec 16, 2021
1 parent 1cda0e2 commit a63bcc3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions index_ov3660.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,20 @@ const uint8_t index_ov3660_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 @@ -310,6 +324,7 @@ const uint8_t index_ov3660_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 @@ -371,6 +386,8 @@ const uint8_t index_ov3660_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 @@ -571,6 +588,10 @@ const uint8_t index_ov3660_html[] = R"=====(<!doctype html>
updateConfig(framesize)
}

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

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

0 comments on commit a63bcc3

Please sign in to comment.