Commit e34c4282 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

+refresh

parent 4ff8c216
...@@ -9,16 +9,9 @@ Copyright (C) 2016 Elphel, Inc. ...@@ -9,16 +9,9 @@ Copyright (C) 2016 Elphel, Inc.
$(function(){ $(function(){
var t1 = $("#test1").jp4({port:2323,width:600,image:"images/elphelimg_lowpass_1.jp4",fast:true}); var t1 = $("#test1").jp4({port:2323,width:600,fast:true});
var t2 = $("#test2").jp4({port:2324,width:600,fast:true});
var t2 = $("#test2").jp4({port:2323,width:600,image:"images/elphelimg_lowpass_1.jp4",precise:true}); var t3 = $("#test3").jp4({port:2325,width:600,fast:true});
var t4 = $("#test4").jp4({port:2326,width:600,fast:true});
t1.cnv.on("canvas_ready",function(){
console.log("canvas1 ready");
});
t2.cnv.on("canvas_ready",function(){
console.log("canvas2 ready");
});
}); });
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
var settings = $.extend({ var settings = $.extend({
port: "", port: "",
image: "test.jp4", image: "test.jp4",
refresh: false,
mosaic: [["Gr","R"],["B" ,"Gb"]], mosaic: [["Gr","R"],["B" ,"Gb"]],
fast: false, fast: false,
precise: false, precise: false,
...@@ -54,6 +55,7 @@ ...@@ -54,6 +55,7 @@
var rq = ""; var rq = "";
if (settings.port!=""){ if (settings.port!=""){
rq = "get-image.php?port="+settings.port+"&rel=bimg&ts="+Date.now(); rq = "get-image.php?port="+settings.port+"&rel=bimg&ts="+Date.now();
settings.refresh = true;
}else{ }else{
rq = settings.image; rq = settings.image;
} }
...@@ -134,7 +136,8 @@ ...@@ -134,7 +136,8 @@
Elphel.drawScaled(cnv_working,cnv_display,settings.width); Elphel.drawScaled(cnv_working,cnv_display,settings.width);
console.log(elem.attr("id")+" processing finished, total time: "+(Date.now()-t0)/1000+" s"); console.log(elem.attr("id")+" processing finished, total time: "+(Date.now()-t0)/1000+" s");
$(this).trigger("canvas_ready"); $(this).trigger("canvas_ready");
//get_image();
if (settings.refresh) get_image();
} }
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment