Give the VFD panel glow levels, a measuring module and a signal schematic

The analyzer shows three levels of glow (a dimmer foot, the body, a nearly
white top segment), faint unlit segments and a light peak-hold mark, on a
nonlinear scale; loud columns glow brighter on their own instead of the
whole panel brightening. The peak frequency becomes one measuring module
(caption, held value, rule, sample rate) with a real hold. The signal path
is a schematic of framed boxes on a bus with nodes, a wire to the lower row,
a pulse that now and then runs along it and a SIGNAL PATH state label.
PLAY / PAUSE / STOP use segment letters with centre strokes, mode lamps get
indicator bars, paused colours fade into unlit phosphor, and a new source
goes dark and relights with its value. LAYOUT() chooses between the full
panel, a spectrum focus and a tape deck composition, or picks by size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sanapachandClaude Opus 5.5 committed 2026-11-21 10:04:07 +02:00
1 parent 73a8e94c78
commit 204d17f14c
3 files changed
+443 -154

No files matched your search

+33 -2
View File
@@ -58,7 +58,7 @@ const BUNDLED_SCRIPTS: &[BundledScript] = &[
id: "vfd_panel",
file_name: "vfd_panel.rhai",
display_name: "VFD panel",
version: 3,
version: 4,
source: include_str!("visualizations/vfd_panel.rhai"),
},
];
@@ -2008,6 +2008,24 @@ mod tests {
let area = Rect::new(0, 0, width as u16, height as u16);
let mut buffer = Buffer::empty(area);
render_commands_to_buffer(&mut buffer, area, &commands);
// nothing is laid out past the bottom of the frame
for command in &commands {
let bottom = match command {
DrawCommand::Text { y, .. }
| DrawCommand::Cell { y, .. }
| DrawCommand::HLine { y, .. } => Some(*y),
DrawCommand::VLine { y, h, .. } | DrawCommand::Rect { y, h, .. } => {
Some(y + h.saturating_sub(1))
}
_ => None,
};
if let Some(bottom) = bottom {
assert!(
i64::from(bottom) < height,
"{width}x{height} {title:?}: drawn at row {bottom}"
);
}
}
}
}
}
@@ -2037,13 +2055,26 @@ mod tests {
r#"fn PALETTE() { "ice" }"#,
1,
),
base.replacen(r#"fn LAYOUT() { "auto" }"#, r#"fn LAYOUT() { "tape" }"#, 1),
base.replacen(
r#"fn LAYOUT() { "auto" }"#,
r#"fn LAYOUT() { "spectrum" }"#,
1,
),
];
assert_ne!(variants[0], variants[1]);
assert_ne!(variants[0], variants[2]);
for source in variants {
let file = tempfile::NamedTempFile::new().unwrap();
std::fs::write(file.path(), &source).unwrap();
for (width, height) in [(30, 8), (80, 24), (160, 45), (240, 70)] {
for (width, height) in [
(30, 8),
(80, 24),
(100, 30),
(110, 40),
(160, 45),
(240, 70),
] {
for title in ["", "Даже не думай — Ёлка", "Track"] {
let mut runtime = ScriptRuntime::default();
// Past the power-on test, with static and a seek pending.