Commit c86c08b9 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

overdue commit of lwir16 controls from summer 2021

parent 3040e83d
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -30,6 +30,8 @@
            const params = new URLSearchParams(location.search);
            const params = new URLSearchParams(location.search);
            const port = params.get('port') || 0;
            const port = params.get('port') || 0;
            const refresh = params.get('refresh') || 5;
            const refresh = params.get('refresh') || 5;
            const sensor_type = params.get('sensor_type') || '';
            console.log("img.html: sensor_type="+sensor_type);


            if (params.get('port')===null){
            if (params.get('port')===null){
                let s = "";
                let s = "";
@@ -42,8 +44,11 @@
            }
            }


            let imgsrv_port = IMGSRV_PORT0 + parseInt(port);
            let imgsrv_port = IMGSRV_PORT0 + parseInt(port);

			if (sensor_type == "boson640") {
	            let t1 = $("#cnv_div").jp4({src:"http://"+location.host+":"+imgsrv_port+"/tiff_palette=2/tiff_telem=1/tiff_auto=0/tiff_convert/bimg",width:1600,fast:true,lowres:2,debug:false,refresh:true});
			} else {
    	        let t1 = $("#cnv_div").jp4({src:"http://"+location.host+":"+imgsrv_port+"/img",width:1600,fast:true,lowres:2,debug:false,refresh:true});
    	        let t1 = $("#cnv_div").jp4({src:"http://"+location.host+":"+imgsrv_port+"/img",width:1600,fast:true,lowres:2,debug:false,refresh:true});
            }


    </script>
    </script>
  </body>
  </body>
+16 −7
Original line number Original line Diff line number Diff line
@@ -122,7 +122,7 @@


  $sensors = get_sensors();
  $sensors = get_sensors();
  $sensor_type = "none";
  $sensor_type = "none";

  $preview_image_cmd=array();
  foreach($sensors as $i => $sensor){
  foreach($sensors as $i => $sensor){
    if ($sensor!="none"){
    if ($sensor!="none"){
        $sensor_type = $sensor;
        $sensor_type = $sensor;
@@ -131,15 +131,24 @@
        $sandp = "http://{$_SERVER["SERVER_ADDR"]}:".($port0+$i);
        $sandp = "http://{$_SERVER["SERVER_ADDR"]}:".($port0+$i);
        $href1 = "$sandp/bimg";
        $href1 = "$sandp/bimg";
        $href2 = "$sandp/mimg";
        $href2 = "$sandp/mimg";

        $href3 = "$sandp/tiff_palette=2/tiff_telem=1/tiff_auto=33/tiff_convert/bimg";
        if ($sensor_type == 'boson640'){
            $preview_image_cmd[] = '/tiff_palette=2/tiff_telem=1/tiff_auto=33/tiff_convert/bimg';
        } else {
            $preview_image_cmd[] = 'img';
        }
        $table_contents .= "<td valign='top'>";
        $table_contents .= "<td valign='top'>";
        $table_contents .= "<div class='port_window img_window'>";
        $table_contents .= "<div class='port_window img_window'>";
        //$table_contents .= "<div><a href=\"$href1\"><img class='img_window' src='$href1' style='width:300px'/></a></div>";
        //$table_contents .= "<div><a href=\"$href1\"><img class='img_window' src='$href1' style='width:300px'/></a></div>";
        if ($sensor_type == boson640){
            $table_contents .= "<div><a href=\"$href3\"><div index='$i' class='port_preview'></div></a></div>";
        } else {
            $table_contents .= "<div><a href=\"$href1\"><div index='$i' class='port_preview'></div></a></div>";
            $table_contents .= "<div><a href=\"$href1\"><div index='$i' class='port_preview'></div></a></div>";
        }
        $table_contents .= "<div style='text-align:center;'>";
        $table_contents .= "<div style='text-align:center;'>";
        $table_contents .= "port $i: ";
        $table_contents .= "port $i: (".$sensor_type.")";
        $table_contents .= "<a title='single image' href='$href1'>bimg</a>, ";
        $table_contents .= "<a title='single image' href='$href1'>bimg</a>, ";
        $table_contents .= "<a href=\"img.html?port=$i\" title='single image, auto refreshed on load, LOW RES, displays jpeg, tiff and jp4 formats'>img</a>, ";
        $table_contents .= "<a href=\"img.html?port=$i&amp;sensor_type=$sensor_type\" title='single image, auto refreshed on load, LOW RES, displays jpeg, tiff and jp4 formats'>img</a>, ";
        $table_contents .= "<a title='multi-part image stream (M-JPEG). Played in browser as is.' href='$href2'>mimg</a>, ";
        $table_contents .= "<a title='multi-part image stream (M-JPEG). Played in browser as is.' href='$href2'>mimg</a>, ";
        $table_contents .= "<a href=\"mjpeg.html?port=$i\" title='MJPEG stream played in html canvas' class='canvas_mjpeg'>canvas</a>";
        $table_contents .= "<a href=\"mjpeg.html?port=$i\" title='MJPEG stream played in html canvas' class='canvas_mjpeg'>canvas</a>";
        $table_contents .= "</div>";
        $table_contents .= "</div>";
@@ -281,9 +290,9 @@
            index = parseInt($(this).attr("index"));
            index = parseInt($(this).attr("index"));
            if (jp4_previews_enable) {
            if (jp4_previews_enable) {
                //jp4_previews[index] = $(this).jp4({ip:location.host,port:2323+index,width:300,fast:true,lowres:4});
                //jp4_previews[index] = $(this).jp4({ip:location.host,port:2323+index,width:300,fast:true,lowres:4});
                jp4_previews[index] = $(this).jp4({src:"http://"+location.host+":"+(2323+index)+"/img",width:300,fast:true,lowres:4});
                jp4_previews[index] = $(this).jp4({src:"http://"+location.host+":"+(2323+index)+"<?php echo $preview_image_cmd[0];?>",width:300,fast:true,lowres:4});
            }else{
            }else{
                $(this).html("<img width='300' src='http://"+location.host+":"+(2323+index)+"/img' />");
                $(this).html("<img width='300' src='http://"+location.host+":"+(2323+index)+"<?php echo $preview_image_cmd[0];?>' />");
            }
            }
        });
        });
    }
    }
+1 −1
Original line number Original line Diff line number Diff line
@@ -358,7 +358,7 @@ EOT;
        // TODO: use lwir16.ini
        // TODO: use lwir16.ini
        $eo_quality = 97;
        $eo_quality = 97;
        $exposure = 1000; // 1 ms
        $exposure = 1000; // 1 ms
        $autoExposureMax = 500000;
        $autoExposureMax = 25000; // 500000; ~28ms - max for 10Hz
        $autoExp = 1;
        $autoExp = 1;
        $gain = 2 * 0x10000;
        $gain = 2 * 0x10000;
        $rScale = 1 * 0x10000;
        $rScale = 1 * 0x10000;
+1 −0
Original line number Original line Diff line number Diff line
@@ -4,6 +4,7 @@ OWN = -o root -g root
INSTDOCS = 0644
INSTDOCS = 0644
INSTALL = install
INSTALL = install
DOCS=       index.html \
DOCS=       index.html \
			index1.html \
            multicam.js \
            multicam.js \
            multicam.css \
            multicam.css \
            multicam.php
            multicam.php
+84 −0
Original line number Original line Diff line number Diff line
<!DOCTYPE HTML>
<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <title>Multi cameras control</title>

    <script src="../js/jquery-3.1.1.js"></script>
    <script src="../js/elphel.js"></script>
    <script src="../js/jcanvas.js"></script>
    <script src="../js/UTIF.js"></script>
    <script src="../js/exif.js"></script>
    <script src="../js/jquery-jp4.js"></script>
    <script src="../js/zip/zip.js"></script>

    <link rel="stylesheet" href="../js/bootstrap/css/bootstrap.css">

    <script type='text/javascript' src='multicam.js'></script>
    <link rel='stylesheet' type='text/css' href='multicam.css'></link>

  </head>
  <!-- 192.168.0.41/multicam/index1.html?ip=192.168.0.41,192.168.0.42,192.168.0.43,192.168.0.44,192.168.0.45 -->
  <body>
    <div id='settings'>
      <table>
      <tr>
        <td>
          <div id='rec_button' class='rec_outer' title='start recording'>
            <div class='rec_inner'></div>
          </div>
        </td>
        <td>
          <button id='snapshot' title='download snapshot' class="btn btn-sm btn-danger">snapshot</button>
        </td>
      </tr>
      <tr id="toggle_awb" title='Auto White Balance'>
        <td>Auto WB:</td>
        <td>
          <div id="toggle_awb" class="btn-group btn-toggle">
            <button class="btn btn-xs btn-success active">ON</button>
            <button class="btn btn-xs btn-default">OFF</button>
          </div>
        </td>
      </tr>
      <tr id="toggle_aexp" title='Auto Exposure'>
        <td>Auto Exposure:</td>
        <td>
          <div id="toggle_aexp" class="btn-group btn-toggle">
            <button class="btn btn-xs btn-success active">ON</button>
            <button class="btn btn-xs btn-default">OFF</button>
          </div>
        </td>
      </tr>
      <tr>
        <td>
          <button id='system_tests' title='system info' class="btn btn-sm btn-success">tests</button>
        </td>
      </tr>
      <tr>
        <td hidden>
          <br/>
          <div id='edit_addrs_input' hidden>
            <div id='eai_text_div'>
              <textarea id='eai_text' rows='4' cols='30'></textarea>
            </div>
            <div id='eai_ok_div'>
              <button id='eai_ok' class="btn btn-sm btn-success">ok</button>
            </div>
          </div>
          <div id='edit_addrs' title='edit ip addresses'>
            <button id='ea_btn' class="btn btn-sm btn-success">+</button>
          </div>
          <div id='addrs'>
          </div>
        </td>
      </tr>
      </table>
    </div>
    <div id='display'>
      <div id='display_status'></div>
      <hr/>
      <div id='display_previews'></div>
    </div>
  </body>
</html>
 No newline at end of file
Loading