181 lines
4.9 KiB
HTML
181 lines
4.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>espScope</title>
|
|
<style>
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
background: #1a1a1a;
|
|
color: #e0e0e0;
|
|
margin: 0;
|
|
padding: 20px;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1000px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
h1 {
|
|
color: #4ade80;
|
|
}
|
|
|
|
.card {
|
|
background: #2d2d2d;
|
|
border-radius: 8px;
|
|
padding: 20px;
|
|
margin-bottom: 20px;
|
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.controls {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(8em, 1fr));
|
|
gap: 15px;
|
|
}
|
|
|
|
label {
|
|
display: block;
|
|
margin-bottom: 5px;
|
|
font-size: 0.9em;
|
|
color: #bbb;
|
|
}
|
|
|
|
label {
|
|
width: 10em;
|
|
}
|
|
|
|
input,
|
|
select {
|
|
width: 6em;
|
|
padding: 8px;
|
|
background: #3d3d3d;
|
|
border: 1px solid #555;
|
|
color: white;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
button {
|
|
background: #4ade80;
|
|
color: #1a1a1a;
|
|
border: none;
|
|
padding: 10px 20px;
|
|
border-radius: 4px;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
button:hover {
|
|
background: #22c55e;
|
|
}
|
|
|
|
canvas {
|
|
width: 100%;
|
|
height: 400px;
|
|
background: #000;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.status {
|
|
font-family: monospace;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.info {
|
|
font-family: monospace;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
#deltaPanel {
|
|
position: absolute;
|
|
background: #2d2d2d;
|
|
color: #e0e0e0;
|
|
padding: 5px 10px;
|
|
border-radius: 4px;
|
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
|
display: none;
|
|
}
|
|
|
|
#triggerLevel {
|
|
/* appearance: slider-vertical; */
|
|
position: relative;
|
|
height: 408px;
|
|
top: -16px;
|
|
margin-left: 10px;
|
|
width: 1px;
|
|
writing-mode: vertical-lr;
|
|
direction: rtl;
|
|
}
|
|
|
|
#resetBtn {
|
|
background: #222;
|
|
color: #e66;
|
|
border: 1px solid;
|
|
font-size: 0.8rem;
|
|
height: 4em;
|
|
width: 6em;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<div class="card">
|
|
<div style="display: flex; position: relative;">
|
|
<canvas id="adcChart"></canvas>
|
|
<input type="range" id="triggerLevel" orient="vertical" min="0" max="4096" value="2048">
|
|
</div>
|
|
<div style="display:flex; justify-content:space-between; align-items:center;">
|
|
<div class="status" id="status">Connecting...</div>
|
|
<button id="reconnectBtn"
|
|
style="display:none; background:#eab308; color:#000; padding:4px 8px; font-size:0.8rem;">Reconnect
|
|
Now</button>
|
|
<div class="info" id="info"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<form id="configForm" class="controls">
|
|
<div>
|
|
<label>Sample Rate (Hz)</label>
|
|
<input type="number" id="sampleRate" value="10000" min="1" max="83333">
|
|
</div>
|
|
<div style="display: none;">
|
|
<label>Bit Width</label>
|
|
<select id="bitWidth">
|
|
<option value="12" selected>12-bit</option>
|
|
<option value="11">11-bit</option>
|
|
<option value="10">10-bit</option>
|
|
<option value="9">9-bit</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label>Attenuation</label>
|
|
<select id="atten">
|
|
<option value="0">0 dB</option>
|
|
<option value="1">2.5 dB</option>
|
|
<option value="2">6 dB</option>
|
|
<option value="3" selected>11 dB</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<label>Test Hz</label>
|
|
<input type="number" id="testHz" value="100" min="1" max="10000">
|
|
</div>
|
|
</div>
|
|
<button id="resetBtn">Reset</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div id="deltaPanel"></div>
|
|
</div>
|
|
|
|
<script src="index.js"></script>
|
|
</body>
|
|
|
|
</html> |