Scrolling text looks jagged: explore ways to make it smoother #2

Closed
opened 2026-11-22 13:20:41 -05:00 by cmoriarty · 1 comment
Owner

A message that passes along a row (an alert's line, a warning, a stopped train's row) moves one LED every 50 ms: 20 LEDs a second, 20 pictures a second. On the panel that reads as a little jagged. The owner, 2026-11-22, watching v0.1.3: "the scrolling text is a bit jagged, I'd like to explore ways to make it appear smoother."

For the release after v0.1.4. To explore, with moving mock-ups for the owner to choose from before anything is built:

  • A higher picture rate at the same speed is not possible: one LED is the smallest step, so 20 LEDs a second is 20 steps a second. What can change is how each step looks.
  • Moving by fractions of an LED, as the name's arrival does (firmware/lib/sign_core/src/name.h): each letter's edge lit in part between two columns. Smoother, and softer at the edges; the panel has 16 levels a colour.
  • A different speed: slower reads calmer and takes longer to pass; some speeds sit better with the panel's refresh than others.
  • Whether the panel's own refresh or the time a picture takes to reach it adds to the look (worth a slow-motion video of the panel).
  • Both boards: the M4 has less to spare.

The looks so far are in openspec/changes/refresh-sign-looks/; this would be a change of its own.

A message that passes along a row (an alert's line, a warning, a stopped train's row) moves one LED every 50 ms: 20 LEDs a second, 20 pictures a second. On the panel that reads as a little jagged. The owner, 2026-11-22, watching v0.1.3: "the scrolling text is a bit jagged, I'd like to explore ways to make it appear smoother." For the release after v0.1.4. To explore, with moving mock-ups for the owner to choose from before anything is built: - A higher picture rate at the same speed is not possible: one LED is the smallest step, so 20 LEDs a second is 20 steps a second. What can change is how each step looks. - Moving by fractions of an LED, as the name's arrival does (`firmware/lib/sign_core/src/name.h`): each letter's edge lit in part between two columns. Smoother, and softer at the edges; the panel has 16 levels a colour. - A different speed: slower reads calmer and takes longer to pass; some speeds sit better with the panel's refresh than others. - Whether the panel's own refresh or the time a picture takes to reach it adds to the look (worth a slow-motion video of the panel). - Both boards: the M4 has less to spare. The looks so far are in `openspec/changes/refresh-sign-looks/`; this would be a change of its own.
Author
Owner

Summary: done, on main (a650ad7, pushed 2026-12-01; not yet in a release).

  • The look: E, chosen by the owner on 2026-12-01 from six moving mock-ups drawn with the sign's own code (the page, 2026-11-30). A passing line moves at 25 LEDs a second, with a picture every sixtieth of a second. Each picture shows the line where it is at that moment: a letter between two columns lights both in part, in the panel's own levels. This is so for an alert's line, a warning too wide for the row, and a stopped train's row. More pictures at the same speed turned out to be possible after all, by moving in fractions of an LED.
  • A second cause, now fixed: the boards drew up to 15 ms late and rounded the line's place down to a whole LED. So in about one pass in five, some steps held still and then jumped two LEDs. That figure comes from the code and the loop timings of 2026-11-22, not from filming. Each picture is now placed from the clock at the moment it is drawn.
  • Pictures on time: while a line passes, each board's loop rests only until the next picture is due, not a flat 10 ms. The simulator steps to each picture, so the browser viewer shows 60 pictures a second.
  • Shorter passes: a pass takes four fifths of the time it did. A delay's message passes in 14 to 29 s, a closure's, shuttle's or suspension's in 33 to 44 s. The rests between passes are unchanged.
  • Checked: 287 unit tests pass, and all 285 snapshot checkpoints, 57 of them approved again. The browser build matches all 284. Both boards build, each with 1 KB more RAM.
  • Not measured: the M4's room for 60 pictures a second, which needs a test build flashed. If it falls short, it draws fewer pictures, each still in its place. A slow-motion video of the panel at 240 frames a second would show a step of five twelfths of an LED every four frames.
  • Plan: openspec/changes/smooth-passing-lines.
**Summary: done, on `main`** (`a650ad7`, pushed 2026-12-01; not yet in a release). - **The look:** E, chosen by the owner on 2026-12-01 from six moving mock-ups drawn with the sign's own code ([the page](https://claude.ai/artifact/BsdT3BvmRU5bvzcs9r8Lv9), 2026-11-30). A passing line moves at 25 LEDs a second, with a picture every sixtieth of a second. Each picture shows the line where it is at that moment: a letter between two columns lights both in part, in the panel's own levels. This is so for an alert's line, a warning too wide for the row, and a stopped train's row. More pictures at the same speed turned out to be possible after all, by moving in fractions of an LED. - **A second cause, now fixed:** the boards drew up to 15 ms late and rounded the line's place down to a whole LED. So in about one pass in five, some steps held still and then jumped two LEDs. That figure comes from the code and the loop timings of 2026-11-22, not from filming. Each picture is now placed from the clock at the moment it is drawn. - **Pictures on time:** while a line passes, each board's loop rests only until the next picture is due, not a flat 10 ms. The simulator steps to each picture, so the browser viewer shows 60 pictures a second. - **Shorter passes:** a pass takes four fifths of the time it did. A delay's message passes in 14 to 29 s, a closure's, shuttle's or suspension's in 33 to 44 s. The rests between passes are unchanged. - **Checked:** 287 unit tests pass, and all 285 snapshot checkpoints, 57 of them approved again. The browser build matches all 284. Both boards build, each with 1 KB more RAM. - **Not measured:** the M4's room for 60 pictures a second, which needs a test build flashed. If it falls short, it draws fewer pictures, each still in its place. A slow-motion video of the panel at 240 frames a second would show a step of five twelfths of an LED every four frames. - **Plan:** `openspec/changes/smooth-passing-lines`.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
moriarty-engineering/my-stop#2
No description provided.