Loading js/camogm.js +2 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ function camogm_rec_start(){ console.log("camogm: begin recording"); //camogm_cmd("mount",false); camogm_cmd("start",true); if (!disable_intervals) intvl_camogm_status = setInterval("camogm_status(true)",10000); if (!disable_intervals) intvl_hdd_free_space = setInterval("camogm_get_ssd_free_space(false)",10000); if (!disable_intervals) intvl_camogm_status = setInterval("camogm_status(true)",5000); if (!disable_intervals) intvl_hdd_free_space = setInterval("camogm_get_ssd_free_space(false)",5000); } function camogm_rec_stop(){ Loading js/eyesis4pi.js +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ var pc_footage_limit = 3000; var pc_gps_imu_device_name = "/dev/sda1"; // TODO: reduce? var camogm_rec_delay = 5; var camogm_rec_delay = 1; var cams = [ {"ip":"192.168.0.161","port":2326,"channel":3,"master":0,"logger":0}, Loading js/tests.js +64 −20 Original line number Diff line number Diff line //global vars var free_space_interval = false; var master_ip = "161"; var master_ip = "163"; var logger_ip = "161" var daemon_restart_en = true; var intvl_temperatures; var n = 8; Loading @@ -22,15 +23,52 @@ var cams = [ ]; function get_master_index(){ for (var i=0;i<cam.length;i++){ if (cams[i].master==1){ return i; } for (var i=0;i<cams.length;i++) if (cams[i].master==1) return i; return -1; } function get_logger_index(){ for (var i=0;i<cams.length;i++) if (cams[i].logger==1) return i; return -1; } function get_unique_cams(){ res = []; res_full = []; for(var i=0;i<cams.length;i++){ if (res.indexOf(cams[i].ip)==-1) { res.push(cams[i].ip); res_full.push(cams[i]); } } return res_full; } function get_unique_rq_str(){ res_full = get_unique_cams(); rq_str = ""; for(var i=0;i<res_full.length;i++){ if (i!=0){ rq_str += ","; } rq_str += res_full[i].ip+":"+res_full[i].port+":"+res_full[i].channel+":"+res_full[i].master+":"+res_full[i].logger; } return rq_str; } function cams_to_str(){ var rq_str = ""; for(var i=0;i<cams.length;i++){ if (i!=0){ rq_str += ","; } rq_str += cams[i].ip+":"+cams[i].port+":"+cams[i].channel+":"+cams[i].master+":"+cams[i].logger; } return rq_str; } function parseURL() { /* var parameters=location.href.replace(/\?/ig,"&").split("&"); for (var i=0;i<parameters.length;i++) parameters[i]=parameters[i].split("="); for (var i=1;i<parameters.length;i++) { Loading @@ -39,6 +77,11 @@ function parseURL() { case "master_ip": master_ip = parseInt(parameters[i][1]);break; } } */ master_ip = cams[get_master_index()].ip; logger_ip = cams[get_logger_index()].ip; } function run(){ Loading @@ -51,7 +94,7 @@ function test7_color_bars_part1(){ //color bars on set_parameter(master_ip,"TESTSENSOR",65544,true); //to JPEG set_parameter(master_ip,"COLOR",1,true); set_parameter(master_ip,"COLOR",0,true); setTimeout("test7_color_bars_part2()",3000); } Loading @@ -78,7 +121,7 @@ function test6_t(){ function test5_imu(){ $.ajax({ url: "tests.php?cmd=imu&master_ip="+master_ip+"&n="+n, url: "tests.php?cmd=imu&rq="+logger_ip, async: true, success: function(response){ test5_update_imu(response); Loading @@ -89,11 +132,11 @@ function test5_imu(){ function test5_update_imu(text){ var html = ""; var data = $(text).find("Document"); var data = $(text).find("board"); var imu = data.find("imu").text(); var imu = data.find("part").text(); if (imu=="1") html += "<div>IMU: OK</div>\n"; if (imu!="") html += "<div>IMU: OK ("+imu+")</div>\n"; else html += "<div class='alerts'>IMU not found</div>\n"; $("#test_5_div").html(html); Loading @@ -104,7 +147,7 @@ function test5_update_imu(text){ function test4_gps(){ $.ajax({ url: "tests.php?cmd=gps&master_ip="+master_ip+"&n="+n, url: "tests.php?cmd=gps&rq="+logger_ip, async: true, success: function(response){ test4_update_gps(response); Loading Loading @@ -138,7 +181,7 @@ function test4_update_gps(text){ html += "</table>"; } html += "<br/><span style='font-size:14px;'>Manual test: check the coordinates <a href='http://192.168.0."+master_ip+":8081/meta'>here</a>.</span>"; html += "<br/><span style='font-size:14px;'>Manual test: check the coordinates <a href='http://"+logger_ip+":2323/meta'>here</a>.</span>"; $("#test_4_div").html(html); Loading @@ -156,7 +199,7 @@ function test3_internal_cf_cards(){ } $.ajax({ url: "tests.php?cmd=cf_cards&rq="+rqstr, url: "tests.php?cmd=ssds&rq="+rqstr, async: true, success: function(response){ test3_update_cards(response); Loading Loading @@ -200,7 +243,7 @@ function test3_update_cards(text){ $("#test_3_div").html(html); //run the next test //test4_gps(); test4_gps(); } function test1_get_number_of_sensors(){ Loading Loading @@ -277,10 +320,9 @@ function test1_update_cams(text){ test3_internal_cf_cards(); } function set_parameter(ip,par,val,async,callback){ var url = "eyesis4pi_control.php?set_parameter&master_ip="+ip+"&n="+n+"&pname="+par+"&pvalue="+val; //console.log("n is "+n); var url = "eyesis4pi_control.php?set_parameter&rq="+cams_to_str()+"&pname="+par+"&pvalue="+val; $.ajax({ url: url, Loading Loading @@ -341,8 +383,8 @@ function previews_init(){ var c = "<table id='prevs_images'><tr>\n"; for (var i=1;i<(n+1);i++) { c += "<td><a href='http://192.168.0.22"+(i)+"'><canvas id='cam"+i+"_canvas' class='prevs'></canvas></a></td>"; for (var i=0;i<cams.length;i++) { c += "<td><canvas id='cam_"+i+"_canvas' class='prevs'></canvas></td>"; } c+= "</tr></table>"; Loading @@ -362,6 +404,7 @@ function working(){ else $("#status").html("Working"); } /* function parseURL() { var parameters=location.href.replace(/\?/ig,"&").split("&"); for (var i=0;i<parameters.length;i++) parameters[i]=parameters[i].split("="); Loading @@ -375,3 +418,4 @@ function parseURL() { if (n!=8&&n!=9) {eyesis4pi_en = false}; console.log("eyesis4pi_en = "+eyesis4pi_en+" n = "+n); } */ No newline at end of file settings.xml +2 −2 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ <footage_limit>3000</footage_limit> <gpsimu_device_name>/dev/sda1</gpsimu_device_name> <box_force_jp4>checked</box_force_jp4> <input_quality>98</input_quality> <input_trigger_period>200</input_trigger_period> <input_quality>97</input_quality> <input_trigger_period>250</input_trigger_period> <input_hdrvexpos>0x36000</input_hdrvexpos> <input_autoexp_max>1</input_autoexp_max> <input_autoexp_lvl>220</input_autoexp_lvl> Loading tests.html +7 −7 Original line number Diff line number Diff line Loading @@ -2,18 +2,18 @@ <head> <title>Eyesis4Pi tests</title> <link rel="shortcut icon" href="favicon.ico" /> <script src="jquery-1.7.2.min.js" type="text/javascript"></script> <script src="tests.js" type="text/javascript"></script> <script src="temperatures.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="temperatures.css" /> <link rel="stylesheet" type="text/css" href="tests.css" /> <script src="js/jquery-1.7.2.min.js" type="text/javascript"></script> <script src="js/tests.js" type="text/javascript"></script> <script src="js/temperatures.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="js/temperatures.css" /> <link rel="stylesheet" type="text/css" href="js/tests.css" /> </head> <body onload="run()"> <h2>Test 1: Number of modules online</h2> <div id="test_1_div"></div> <!-- <h2>Test 2: Test pattern</h2> <div id="test_2_div"></div>--> <h2>Test 2: Internal storage</h2> <h2>Test 2: Storage</h2> <div id="test_3_div"></div> <h2>Test 3: GPS</h2> <div id="test_4_div"></div> Loading @@ -21,7 +21,7 @@ <div id="test_5_div"></div> <h2>Test 5: Temperatures </h2> <div id="test_6_div"></div> <h2>Test 6: Color bars </h2> <h2>Test 6: Test pattern </h2> <div id="test_7_div"> <table> <tr> Loading Loading
js/camogm.js +2 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ function camogm_rec_start(){ console.log("camogm: begin recording"); //camogm_cmd("mount",false); camogm_cmd("start",true); if (!disable_intervals) intvl_camogm_status = setInterval("camogm_status(true)",10000); if (!disable_intervals) intvl_hdd_free_space = setInterval("camogm_get_ssd_free_space(false)",10000); if (!disable_intervals) intvl_camogm_status = setInterval("camogm_status(true)",5000); if (!disable_intervals) intvl_hdd_free_space = setInterval("camogm_get_ssd_free_space(false)",5000); } function camogm_rec_stop(){ Loading
js/eyesis4pi.js +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ var pc_footage_limit = 3000; var pc_gps_imu_device_name = "/dev/sda1"; // TODO: reduce? var camogm_rec_delay = 5; var camogm_rec_delay = 1; var cams = [ {"ip":"192.168.0.161","port":2326,"channel":3,"master":0,"logger":0}, Loading
js/tests.js +64 −20 Original line number Diff line number Diff line //global vars var free_space_interval = false; var master_ip = "161"; var master_ip = "163"; var logger_ip = "161" var daemon_restart_en = true; var intvl_temperatures; var n = 8; Loading @@ -22,15 +23,52 @@ var cams = [ ]; function get_master_index(){ for (var i=0;i<cam.length;i++){ if (cams[i].master==1){ return i; } for (var i=0;i<cams.length;i++) if (cams[i].master==1) return i; return -1; } function get_logger_index(){ for (var i=0;i<cams.length;i++) if (cams[i].logger==1) return i; return -1; } function get_unique_cams(){ res = []; res_full = []; for(var i=0;i<cams.length;i++){ if (res.indexOf(cams[i].ip)==-1) { res.push(cams[i].ip); res_full.push(cams[i]); } } return res_full; } function get_unique_rq_str(){ res_full = get_unique_cams(); rq_str = ""; for(var i=0;i<res_full.length;i++){ if (i!=0){ rq_str += ","; } rq_str += res_full[i].ip+":"+res_full[i].port+":"+res_full[i].channel+":"+res_full[i].master+":"+res_full[i].logger; } return rq_str; } function cams_to_str(){ var rq_str = ""; for(var i=0;i<cams.length;i++){ if (i!=0){ rq_str += ","; } rq_str += cams[i].ip+":"+cams[i].port+":"+cams[i].channel+":"+cams[i].master+":"+cams[i].logger; } return rq_str; } function parseURL() { /* var parameters=location.href.replace(/\?/ig,"&").split("&"); for (var i=0;i<parameters.length;i++) parameters[i]=parameters[i].split("="); for (var i=1;i<parameters.length;i++) { Loading @@ -39,6 +77,11 @@ function parseURL() { case "master_ip": master_ip = parseInt(parameters[i][1]);break; } } */ master_ip = cams[get_master_index()].ip; logger_ip = cams[get_logger_index()].ip; } function run(){ Loading @@ -51,7 +94,7 @@ function test7_color_bars_part1(){ //color bars on set_parameter(master_ip,"TESTSENSOR",65544,true); //to JPEG set_parameter(master_ip,"COLOR",1,true); set_parameter(master_ip,"COLOR",0,true); setTimeout("test7_color_bars_part2()",3000); } Loading @@ -78,7 +121,7 @@ function test6_t(){ function test5_imu(){ $.ajax({ url: "tests.php?cmd=imu&master_ip="+master_ip+"&n="+n, url: "tests.php?cmd=imu&rq="+logger_ip, async: true, success: function(response){ test5_update_imu(response); Loading @@ -89,11 +132,11 @@ function test5_imu(){ function test5_update_imu(text){ var html = ""; var data = $(text).find("Document"); var data = $(text).find("board"); var imu = data.find("imu").text(); var imu = data.find("part").text(); if (imu=="1") html += "<div>IMU: OK</div>\n"; if (imu!="") html += "<div>IMU: OK ("+imu+")</div>\n"; else html += "<div class='alerts'>IMU not found</div>\n"; $("#test_5_div").html(html); Loading @@ -104,7 +147,7 @@ function test5_update_imu(text){ function test4_gps(){ $.ajax({ url: "tests.php?cmd=gps&master_ip="+master_ip+"&n="+n, url: "tests.php?cmd=gps&rq="+logger_ip, async: true, success: function(response){ test4_update_gps(response); Loading Loading @@ -138,7 +181,7 @@ function test4_update_gps(text){ html += "</table>"; } html += "<br/><span style='font-size:14px;'>Manual test: check the coordinates <a href='http://192.168.0."+master_ip+":8081/meta'>here</a>.</span>"; html += "<br/><span style='font-size:14px;'>Manual test: check the coordinates <a href='http://"+logger_ip+":2323/meta'>here</a>.</span>"; $("#test_4_div").html(html); Loading @@ -156,7 +199,7 @@ function test3_internal_cf_cards(){ } $.ajax({ url: "tests.php?cmd=cf_cards&rq="+rqstr, url: "tests.php?cmd=ssds&rq="+rqstr, async: true, success: function(response){ test3_update_cards(response); Loading Loading @@ -200,7 +243,7 @@ function test3_update_cards(text){ $("#test_3_div").html(html); //run the next test //test4_gps(); test4_gps(); } function test1_get_number_of_sensors(){ Loading Loading @@ -277,10 +320,9 @@ function test1_update_cams(text){ test3_internal_cf_cards(); } function set_parameter(ip,par,val,async,callback){ var url = "eyesis4pi_control.php?set_parameter&master_ip="+ip+"&n="+n+"&pname="+par+"&pvalue="+val; //console.log("n is "+n); var url = "eyesis4pi_control.php?set_parameter&rq="+cams_to_str()+"&pname="+par+"&pvalue="+val; $.ajax({ url: url, Loading Loading @@ -341,8 +383,8 @@ function previews_init(){ var c = "<table id='prevs_images'><tr>\n"; for (var i=1;i<(n+1);i++) { c += "<td><a href='http://192.168.0.22"+(i)+"'><canvas id='cam"+i+"_canvas' class='prevs'></canvas></a></td>"; for (var i=0;i<cams.length;i++) { c += "<td><canvas id='cam_"+i+"_canvas' class='prevs'></canvas></td>"; } c+= "</tr></table>"; Loading @@ -362,6 +404,7 @@ function working(){ else $("#status").html("Working"); } /* function parseURL() { var parameters=location.href.replace(/\?/ig,"&").split("&"); for (var i=0;i<parameters.length;i++) parameters[i]=parameters[i].split("="); Loading @@ -375,3 +418,4 @@ function parseURL() { if (n!=8&&n!=9) {eyesis4pi_en = false}; console.log("eyesis4pi_en = "+eyesis4pi_en+" n = "+n); } */ No newline at end of file
settings.xml +2 −2 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ <footage_limit>3000</footage_limit> <gpsimu_device_name>/dev/sda1</gpsimu_device_name> <box_force_jp4>checked</box_force_jp4> <input_quality>98</input_quality> <input_trigger_period>200</input_trigger_period> <input_quality>97</input_quality> <input_trigger_period>250</input_trigger_period> <input_hdrvexpos>0x36000</input_hdrvexpos> <input_autoexp_max>1</input_autoexp_max> <input_autoexp_lvl>220</input_autoexp_lvl> Loading
tests.html +7 −7 Original line number Diff line number Diff line Loading @@ -2,18 +2,18 @@ <head> <title>Eyesis4Pi tests</title> <link rel="shortcut icon" href="favicon.ico" /> <script src="jquery-1.7.2.min.js" type="text/javascript"></script> <script src="tests.js" type="text/javascript"></script> <script src="temperatures.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="temperatures.css" /> <link rel="stylesheet" type="text/css" href="tests.css" /> <script src="js/jquery-1.7.2.min.js" type="text/javascript"></script> <script src="js/tests.js" type="text/javascript"></script> <script src="js/temperatures.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="js/temperatures.css" /> <link rel="stylesheet" type="text/css" href="js/tests.css" /> </head> <body onload="run()"> <h2>Test 1: Number of modules online</h2> <div id="test_1_div"></div> <!-- <h2>Test 2: Test pattern</h2> <div id="test_2_div"></div>--> <h2>Test 2: Internal storage</h2> <h2>Test 2: Storage</h2> <div id="test_3_div"></div> <h2>Test 3: GPS</h2> <div id="test_4_div"></div> Loading @@ -21,7 +21,7 @@ <div id="test_5_div"></div> <h2>Test 5: Temperatures </h2> <div id="test_6_div"></div> <h2>Test 6: Color bars </h2> <h2>Test 6: Test pattern </h2> <div id="test_7_div"> <table> <tr> Loading