Skip to content

feat(DrumDisplay): optional leading-zero suppression for variable-width readouts #196

Description

@mottihoresh

Motivation

Some readouts show a variable number of digits with no leading zeros — e.g. the AN/ARC-51A preset-channel window (#171) displays 1..9 as a single digit and 10..20 as two. Today DrumDisplay always renders the full nDigits width, so a 2-digit readout would show 01 instead of 1.

Proposal

Add a per-readout option to DrumReadout:

  • bool suppressLeadingZerodefault false (no behavior change for existing readouts: APN-153 speed, ASN-41 nav digits, etc.).
  • When true: blank the high-order digit cells until the first non-zero digit. The remaining digits still roll/animate normally (animation unchanged).

Scope

  • suppressLeadingZero field on DrumReadout (default false).
  • Render path: blank leading-zero cells when enabled; keep tape animation for the live digits.
  • Unit test: 1↔2 digit transition (e.g. 9109) renders without a leading zero; default-false path unchanged.

Consumers

Out of scope

Render-mode / snap-vs-animate (animation stays as-is per maintainer). This ticket is leading-zero only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfirmwareFirmware implementation workneeds testingFirmware / Code is complete including unit tests, final bench testing needs to be done.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions