Commit f554871e authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

switched to newer function

parent a20f3d19
...@@ -333,7 +333,7 @@ ...@@ -333,7 +333,7 @@
switch(pname){ switch(pname){
case "AUTOEXP_EXP_MAX": case "AUTOEXP_EXP_MAX":
pvalue = parseInt(pvalue*1000); pvalue = parseInt(pvalue*1000);
set_param(pname,pvalue,()=>{ set_params({[pname]:pvalue},()=>{
console.log("ok"); console.log("ok");
}); });
break; break;
...@@ -343,13 +343,13 @@ ...@@ -343,13 +343,13 @@
if ($('#toggle_aexp').find('.btn.active').html()==="ON"){ if ($('#toggle_aexp').find('.btn.active').html()==="ON"){
$('#toggle_aexp').click(); $('#toggle_aexp').click();
} }
set_param(pname,pvalue,()=>{ set_params({[pname]:pvalue},()=>{
console.log("ok"); console.log("ok");
}); });
break; break;
case "TRIG_PERIOD": case "TRIG_PERIOD":
pvalue = parseInt(1/pvalue*10e7); pvalue = parseInt(1/pvalue*10e7);
set_param(pname,pvalue,()=>{ set_params({[pname]:pvalue},()=>{
console.log("ok"); console.log("ok");
update_canvas_mjpeg(); update_canvas_mjpeg();
}); });
...@@ -395,13 +395,6 @@ ...@@ -395,13 +395,6 @@
} }
async function set_param(pname,pvalue,callback){
$.ajax({
url: "parsedit.php?immediate&sensor_port=<?php echo $master_port;?>&"+pname+"="+pvalue+"*3&*"+pname+"=0xf",
success: callback
});
}
async function set_params(pars,callback){ async function set_params(pars,callback){
let req = []; let req = [];
......
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