-
Notifications
You must be signed in to change notification settings - Fork 7
/
camera.html
50 lines (42 loc) · 1.64 KB
/
camera.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{% extends "base.html" %}
{% block content %}
<div class="large-6 medium-6 small-6 row" style="display: flex; align-items: baseline;" align="right">
<div class="large-7 medium-7 small-7 columns">
<h1>Camera  
<div class="switch il">
<input class="switch-input" id="camera-switch" type="checkbox" name="camera-switch" onclick="refreshForMsg('{{ url_for('switch_camera') }}')" {% if robot.camera %} checked{% endif %}>
<label class="switch-paddle" for="camera-switch">
<span class="show-for-sr">Camera ON/OFF</span>
</label>
</div>
</h1>
</div>
<div class="large-5 medium-5 small-5 columns">
<p>FPS <input type="range" id="fps" min="1" max="11" value="{{ FPS }}" style="height: 10px;"> <span id="print_fps"> {{ FPS }} f/s</span></p>
</div>
 
</div>
<div class="large-6 row" align="middle" >
<div class="large-12 columns">
<div class="callout" align='middle'>
<img src="{{ source }}" id="frame" alt="No Frame Found. Check Logs"><br>
</div>
<a class="button button-primary" id="snapshot" href="{{ source }}/saved_in_my_documents" target="_blank" >Capture</a><br>
</div>
</div>
{% endblock content %}
{% block endscript %}
<script>
var FPS = {{ FPS }};
var source = "{{ source }}";
$("#fps").change(function() {
FPS=parseInt(document.getElementById("fps").value)
document.getElementById("print_fps").innerHTML=document.getElementById("fps").value + " f/s";
});
function refreshIt() {
document.getElementById("frame").src = source;
setTimeout("refreshIt()", 1000/FPS);
}
setTimeout("refreshIt()",250);
</script>
{% endblock endscript %}