Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:jywarren/spectral-workbench

  • Loading branch information...
commit 4e0259acf49e6248831efc1d2821fa77b4c2b029 2 parents 162720f + fbfa7b3
@jywarren authored
View
5 webserver/app/views/capture/_configure.html.erb
@@ -24,9 +24,10 @@
<p><i>This panel is under construction</i></p>
- <label for="samplerow-slider">Input slider:</label>
- <input type="range" name="samplerow-slider" id="samplerow-slider" value="240" min="0" max="480" onChange="$W.setSampleRows(parseInt($('#samplerow-slider').val()),parseInt($('#samplerow-slider').val())+40)"/>
+ <label for="samplerow-slider">Sample row height (zero = top):</label>
+ <input type="range" name="samplerow-slider" id="samplerow-slider" value="240" min="0" max="480" onChange="$W.setSampleRows(parseInt($('#samplerow-slider').val()),parseInt($('#samplerow-slider').val())+40);$('#heightIndicator')[0].style.height = parseInt(($('#samplerow-slider').val()/480)*280)+'px';"/>
+ <div id="heightIndicator" style="position:absolute;z-index:999;opacity:0.4;background:black;height:120px;width:320px;"></div>
<div id="webcam"></div>
<a data-role="button" data-theme="a" href="#capture" data-panel="main">&laquo; Back</a>
</div>
View
12 webserver/public/javascripts/capture.js
@@ -55,6 +55,8 @@ $W = {
this.sample_height = this.sample_end_row - this.sample_start_row // how many pixels to sample
setInterval($W.alert_overexposure,3000)
$W.data = [{label: "webcam",data:[]}]
+ $('video')[0].width = "320"
+ $('video')[0].height = "280"
},
success: function (stream) {
//console.log('success')
@@ -262,6 +264,16 @@ $W = {
$('#lat').val('')
},
+ calibrate: function(id,x1,w1,x2,w2) {
+ $.ajax({
+ url: "/spectra/calibrate/"+$W.spectrum_id+"?x1="+x1+"&w1="+w1+"&x2="+x2+"&w2="+w2,
+ type: "POST",
+ success: function(result) {
+ $W.notify('The spectrum with id '+id+' was calibrated successfully.')
+ }
+ })
+ },
+
match: function() {
cols = []
$.each($W.full_data,function(i,datum) {
Please sign in to comment.
Something went wrong with that request. Please try again.