Lets users choose among the last 3 releases (v3.6.3 latest, v3.6.2, v3.6.1) instead of only ever flashing the newest build - handy for testing or rolling back. Archives the real historical binaries for v3.6.1/v3.6.2 under versions/, each with its own manifest.json. Documents the archival step as part of the standard release workflow in CLAUDE.md so the picker stays current on future releases. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
240 lines
8.2 KiB
HTML
240 lines
8.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Eiswolfs Flightradar CYD - Web Installer</title>
|
|
<!-- ESP Web Tools Installer Script -->
|
|
<script type="module" src="https://unpkg.com/esp-web-tools@10/dist/web/install-button.js?module"></script>
|
|
|
|
<style>
|
|
:root {
|
|
--bg-color: #0a0f0d;
|
|
--card-bg: #111a16;
|
|
--text-color: #39ff14; /* Radar Green */
|
|
--accent-color: #00ff66;
|
|
--border-color: #1f3a2b;
|
|
}
|
|
body {
|
|
font-family: 'Courier New', Courier, monospace; /* Retro radar style */
|
|
background-color: var(--bg-color);
|
|
color: var(--text-color);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 100vh;
|
|
margin: 0;
|
|
}
|
|
.container {
|
|
background-color: var(--card-bg);
|
|
padding: 40px;
|
|
border-radius: 15px;
|
|
border: 2px solid var(--border-color);
|
|
box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
|
|
text-align: center;
|
|
max-width: 450px;
|
|
width: 100%;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* Twinkling star background (same triangle-wave dim/brighten
|
|
formula as menu_stars.cpp/radar_screen.cpp on the device) -
|
|
placed as the first element in <body> and given z-index:0
|
|
(NOT a negative z-index) so it stacks reliably behind
|
|
.container without depending on how the browser paints the
|
|
body's own background layer. pointer-events:none keeps the
|
|
ESP Web Tools install button and all links fully clickable. */
|
|
#star-bg {
|
|
position: fixed;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 0;
|
|
pointer-events: none;
|
|
}
|
|
h1 {
|
|
font-size: 22px;
|
|
margin-bottom: 5px;
|
|
text-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
|
|
}
|
|
.subtitle {
|
|
font-size: 12px;
|
|
color: #88bc88;
|
|
text-transform: uppercase;
|
|
letter-spacing: 2px;
|
|
margin-bottom: 15px;
|
|
}
|
|
.version-badge {
|
|
display: inline-block;
|
|
background-color: rgba(57, 255, 20, 0.1);
|
|
border: 1px solid var(--border-color);
|
|
color: var(--accent-color);
|
|
font-size: 11px;
|
|
padding: 4px 10px;
|
|
border-radius: 20px;
|
|
margin-bottom: 25px;
|
|
text-shadow: 0 0 4px rgba(57, 255, 20, 0.4);
|
|
}
|
|
.version-picker {
|
|
text-align: left;
|
|
font-size: 12px;
|
|
color: #aae0aa;
|
|
margin-bottom: 20px;
|
|
}
|
|
.version-picker label {
|
|
display: block;
|
|
margin-bottom: 4px;
|
|
}
|
|
.version-picker select {
|
|
width: 100%;
|
|
background-color: var(--bg-color);
|
|
color: var(--text-color);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 4px;
|
|
padding: 6px 8px;
|
|
font-family: inherit;
|
|
font-size: 13px;
|
|
}
|
|
.version-picker .hint {
|
|
font-size: 11px;
|
|
color: #6a8f6a;
|
|
margin-top: 6px;
|
|
}
|
|
p {
|
|
font-size: 14px;
|
|
color: #ffffff;
|
|
margin-bottom: 30px;
|
|
line-height: 1.5;
|
|
}
|
|
.instructions {
|
|
text-align: left;
|
|
background: rgba(0, 0, 0, 0.4);
|
|
padding: 15px;
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
color: #aae0aa;
|
|
margin-bottom: 30px;
|
|
border-left: 3px solid var(--accent-color);
|
|
}
|
|
.browser-note {
|
|
font-size: 11px;
|
|
color: #6a8f6a;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
/* Customizing the ESP Web Tools button */
|
|
esp-web-install-button {
|
|
--esp-tools-button-bg-color: var(--accent-color);
|
|
--esp-tools-button-text-color: #0a0f0d;
|
|
--esp-tools-button-border-radius: 4px;
|
|
}
|
|
</style>
|
|
<script data-goatcounter="https://eiswolf-bg.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
|
|
</head>
|
|
<body>
|
|
<canvas id="star-bg"></canvas>
|
|
<div class="container">
|
|
<h1>EISWOLFS FLIGHTRADAR CYD</h1>
|
|
<div class="subtitle">Firmware Flash Utility</div>
|
|
<div class="version-badge">Version: <span id="versionLabel">v3.6.3</span></div>
|
|
|
|
<p>Install the Flightradar firmware directly from your browser to your Cheap Yellow Display.</p>
|
|
|
|
<div class="version-picker">
|
|
<label for="versionSelect">Install version:</label>
|
|
<select id="versionSelect">
|
|
<option value="manifest.json" data-version="v3.6.3" selected>v3.6.3 (latest)</option>
|
|
<option value="versions/v3.6.2/manifest.json" data-version="v3.6.2">v3.6.2</option>
|
|
<option value="versions/v3.6.1/manifest.json" data-version="v3.6.1">v3.6.1</option>
|
|
</select>
|
|
<div class="hint">Older versions are only kept for testing or rolling back - the latest version is recommended for most users.</div>
|
|
</div>
|
|
|
|
<div class="instructions">
|
|
1. Connect your CYD via USB cable<br>
|
|
2. Click the "Connect" button below<br>
|
|
3. Select the correct COM port<br>
|
|
4. Sit back and wait for the process to finish
|
|
</div>
|
|
<!-- References the manifest.json in the same folder by default;
|
|
changed at runtime by the version picker above. -->
|
|
<esp-web-install-button manifest="manifest.json" data-goatcounter-click="flash-button" data-goatcounter-title="Firmware geflasht"></esp-web-install-button>
|
|
|
|
<div class="browser-note">Requires Chrome, Edge, or Opera (Web Serial API)</div>
|
|
</div>
|
|
<script>
|
|
(function () {
|
|
// Same triangle-wave dim/brighten twinkle formula (phase 0-255-0) used
|
|
// by MenuStars on the device - ties the web flasher's look to the
|
|
// device UI. STAR_COUNT scales with viewport area instead of a fixed
|
|
// number, so it stays sparse-but-present on both small phones and
|
|
// large desktop windows without needing a manual breakpoint.
|
|
const canvas = document.getElementById('star-bg');
|
|
if (!canvas) return;
|
|
const ctx = canvas.getContext('2d');
|
|
let stars = [];
|
|
|
|
function starCountFor(w, h) {
|
|
const density = (w * h) / 9000;
|
|
return Math.max(40, Math.min(160, Math.round(density)));
|
|
}
|
|
|
|
function resize() {
|
|
canvas.width = window.innerWidth;
|
|
canvas.height = window.innerHeight;
|
|
}
|
|
|
|
function initStars() {
|
|
const count = starCountFor(canvas.width, canvas.height);
|
|
stars = [];
|
|
for (let i = 0; i < count; i++) {
|
|
stars.push({
|
|
x: Math.random() * canvas.width,
|
|
y: Math.random() * canvas.height,
|
|
phase: Math.random() * 256,
|
|
speed: 1 + Math.random() * 2
|
|
});
|
|
}
|
|
}
|
|
|
|
let resizeTimer = null;
|
|
window.addEventListener('resize', () => {
|
|
clearTimeout(resizeTimer);
|
|
resizeTimer = setTimeout(() => { resize(); initStars(); }, 150);
|
|
});
|
|
resize();
|
|
initStars();
|
|
|
|
function draw() {
|
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
for (const s of stars) {
|
|
s.phase = (s.phase + s.speed) % 256;
|
|
const bright = s.phase < 128 ? s.phase * 2 : (255 - s.phase) * 2;
|
|
ctx.fillStyle = `rgb(0, ${bright}, 0)`;
|
|
ctx.fillRect(s.x, s.y, 2, 2);
|
|
}
|
|
requestAnimationFrame(draw);
|
|
}
|
|
draw();
|
|
})();
|
|
</script>
|
|
<script>
|
|
(function () {
|
|
// Version picker: repoints the ESP Web Tools install button at a
|
|
// different manifest.json when the user picks an older version, and
|
|
// keeps the "Version: vX.Y.Z" badge in sync with the current selection.
|
|
const select = document.getElementById('versionSelect');
|
|
const button = document.querySelector('esp-web-install-button');
|
|
const label = document.getElementById('versionLabel');
|
|
if (!select || !button) return;
|
|
select.addEventListener('change', function () {
|
|
const opt = select.options[select.selectedIndex];
|
|
button.setAttribute('manifest', select.value);
|
|
if (label && opt) label.textContent = opt.dataset.version || opt.textContent;
|
|
});
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|