- Sequences v2, bridges and sim-controller changes from the working tree. - Records the led-driver, led-tool and led-simulator commits above. - Includes dmx-driver/ and graphify-out/. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
136 lines
4.3 KiB
HTML
136 lines
4.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>LED device settings</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<style>
|
|
:root {
|
|
color-scheme: dark;
|
|
--text: #e5e7eb;
|
|
--muted: #9ca3af;
|
|
--border: #374151;
|
|
--accent: #3b82f6;
|
|
--danger: #f87171;
|
|
}
|
|
* { box-sizing: border-box; }
|
|
body {
|
|
margin: 0;
|
|
font-family: system-ui, sans-serif;
|
|
background: #0b1020;
|
|
color: var(--text);
|
|
padding: 1rem;
|
|
}
|
|
h1 { font-size: 1.15rem; margin: 0 0 0.35rem; }
|
|
.muted { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
|
|
.card {
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 1rem;
|
|
margin-bottom: 1rem;
|
|
background: #111827;
|
|
}
|
|
label { display: block; font-size: 0.85rem; margin-bottom: 0.25rem; color: var(--muted); }
|
|
input, select, textarea {
|
|
width: 100%;
|
|
padding: 0.5rem;
|
|
border-radius: 4px;
|
|
border: 1px solid var(--border);
|
|
background: #1f2937;
|
|
color: var(--text);
|
|
margin-bottom: 0.65rem;
|
|
}
|
|
.row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: flex-end; }
|
|
.row > * { flex: 1; min-width: 10rem; }
|
|
.btn {
|
|
padding: 0.45rem 0.85rem;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
background: #4b5563;
|
|
color: #fff;
|
|
font-size: 0.9rem;
|
|
}
|
|
.btn-primary { background: var(--accent); }
|
|
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
.grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
|
|
gap: 0 0.5rem;
|
|
}
|
|
#status { font-size: 0.85rem; margin-top: 0.5rem; }
|
|
#status.error { color: var(--danger); }
|
|
.flash {
|
|
display: none;
|
|
padding: 0.5rem 0.75rem;
|
|
border-radius: 4px;
|
|
margin-bottom: 0.75rem;
|
|
background: #14532d;
|
|
color: #86efac;
|
|
}
|
|
.flash.error { background: #5e1b1b; color: #fca5a5; }
|
|
.flash.show { display: block; }
|
|
[hidden] { display: none !important; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Device settings</h1>
|
|
<div id="flash" class="flash"></div>
|
|
|
|
<div class="card" id="espnow-wrap">
|
|
<h2 style="font-size:1rem;margin:0 0 0.5rem;">Over ESP-NOW</h2>
|
|
<p class="muted">Sent to the driver through the controller, no cable. Blank fields stay as they are on the driver.</p>
|
|
<label for="espnow-device">Driver</label>
|
|
<select id="espnow-device"></select>
|
|
<div class="grid">
|
|
<div>
|
|
<label for="espnow-name">Name</label>
|
|
<input id="espnow-name" data-espnow="name" type="text" />
|
|
</div>
|
|
<div>
|
|
<label for="espnow-num-leds">Num LEDs</label>
|
|
<input id="espnow-num-leds" data-espnow="num_leds" type="number" min="1" max="2048" />
|
|
</div>
|
|
<div>
|
|
<label for="espnow-color-order">Colour order</label>
|
|
<select id="espnow-color-order" data-espnow="color_order">
|
|
<option value=""></option>
|
|
<option value="rgb">RGB</option>
|
|
<option value="rbg">RBG</option>
|
|
<option value="grb">GRB</option>
|
|
<option value="gbr">GBR</option>
|
|
<option value="brg">BRG</option>
|
|
<option value="bgr">BGR</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label for="espnow-startup-mode">Startup mode</label>
|
|
<select id="espnow-startup-mode" data-espnow="startup_mode">
|
|
<option value=""></option>
|
|
<option value="default">Default preset</option>
|
|
<option value="last">Last preset</option>
|
|
<option value="off">Off</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label for="espnow-max-brightness">Max brightness</label>
|
|
<input id="espnow-max-brightness" data-espnow="max_brightness" type="number" min="0" max="255" />
|
|
</div>
|
|
<div>
|
|
<label for="espnow-reversed">Direction</label>
|
|
<select id="espnow-reversed" data-espnow="reversed">
|
|
<option value=""></option>
|
|
<option value="false">Normal</option>
|
|
<option value="true">Reversed</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="row" style="margin-top:0.75rem;">
|
|
<button type="button" class="btn btn-primary" id="espnow-send">Send to driver</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/static/settings_editor.js"></script>
|
|
</body>
|
|
</html>
|