Initial commit
This commit is contained in:
commit
95e10b14dc
5 changed files with 627 additions and 0 deletions
117
index.html
Normal file
117
index.html
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>OpenFlexure Microscope API Demo</title>
|
||||
|
||||
<link rel= "stylesheet" type= "text/css" href="./static/style.css">
|
||||
<script type="text/javascript" src="./static/main.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimal-ui, maximum-scale=1.0, user-scalable=0">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="row">
|
||||
<div class="column left" id="left-sb">
|
||||
<h2>Settings</h2>
|
||||
Host: <input type="text" id="microscopeHostInput" value="192.168.1.126"><br>
|
||||
Port: <input type="number" id="microscopePortInput" value=5000><br>
|
||||
<button type="button" onclick="setHostFromInput();">Connect</button>
|
||||
|
||||
<h3>Position</h3>
|
||||
<p>
|
||||
x: <input type="number" id="x_abs"><br>
|
||||
y: <input type="number" id="y_abs"><br>
|
||||
z: <input type="number" id="z_abs"><br>
|
||||
</p>
|
||||
<p>
|
||||
<button type="button" onclick="setStagePositionsFromInput();">GO</button>
|
||||
<button type="button" onclick="getStagePositions();">Update</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Doubleclick to position: <input type="checkbox" id="clickPositionCheck" checked><br>
|
||||
<div class="flexbox">
|
||||
<div class="flexgrow">FOV width:</div>
|
||||
<div>
|
||||
<input type="number" id="fovXText" onchange="fovX = Number(this.value); updateTextBoxes();" style="width: 7em" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox">
|
||||
<div class="flexgrow">FOV height:</div>
|
||||
<div>
|
||||
<input type="number" id="fovYText" onchange="fovY = Number(this.value); updateTextBoxes();" style="width: 7em" >
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
|
||||
<h3>Move</h3>
|
||||
|
||||
<p>
|
||||
<b>Up/down/left/right:</b> <br>
|
||||
Move stage in x-y. <br>
|
||||
<b>PgUp/PgDn: </b> <br>
|
||||
Move stage in z/focus.
|
||||
</p>
|
||||
|
||||
<h4>Velocity:</h4>
|
||||
<div class="flexbox">
|
||||
<div class="flexgrow">x-y:</div>
|
||||
<div>
|
||||
<input type="range" id="stageVelocityInput" min="50" max="200" oninput="stageVelocity = Number(this.value); updateTextBoxes();">
|
||||
<input type="text" id="stageVelocityText" size="3" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flexbox">
|
||||
<div class="flexgrow">z:</div>
|
||||
<div>
|
||||
<input type="range" id="focusVelocityInput" min="10" max="100" oninput="focusVelocity = Number(this.value); updateTextBoxes();">
|
||||
<input type="text" id="focusVelocityText" size="3" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p>Scroll to focus: <input type="checkbox" id="scrollFocusCheck" checked></p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="column middle">
|
||||
<div id="left-sb-btn" class="sb-btn">
|
||||
<button type="button" onclick="toggleClassToDiv('left-sb', 'hidden');">
|
||||
<img src="./static/icons/baseline-settings-20px.svg">
|
||||
</button>
|
||||
</div>
|
||||
<div id="right-sb-btn" class="sb-btn">
|
||||
<button type="button" onclick="toggleClassToDiv('right-sb', 'hidden');">
|
||||
<img src="./static/icons/baseline-camera_alt-24px.svg">
|
||||
</button>
|
||||
</div>
|
||||
<div id="streambox">No active stream</div>
|
||||
</div>
|
||||
|
||||
<div class="column right" id="right-sb">
|
||||
<h2>Capture</h2>
|
||||
Filename: <br>
|
||||
<input type="text" id="captureFilenameInput" placeholder="Leave blank for default"><br>
|
||||
Store on Pi: <input type="checkbox" id="captureKeepOnDiskCheck"><br>
|
||||
Full resolution: <input type="checkbox" id="captureFullResolutionCheck"><br>
|
||||
Keep raw data: <input type="checkbox" id="captureBayerCheck"><br>
|
||||
Resize capture: <input type="checkbox" id="captureResizeCheck" onclick="newCaptureResizeToggle(this);"><br>
|
||||
<input type="number" id="captureWidthInput" value="640" style="width: 7em" disabled>
|
||||
<input type="number" id="captureHeightInput" value="480" style="width: 7em" disabled><br>
|
||||
|
||||
<button type="button" onclick="newCaptureFromInput();">Capture</button>
|
||||
|
||||
<h2>Captures</h2>
|
||||
<button type="button" onclick="getCaptures();">Update</button>
|
||||
<button type="button" onclick="deleteAllCaptures();">Delete all</button>
|
||||
<div id="captures"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue