Skip to content

Volume setting appears on hardware without a buzzer and does nothing #580

Description

@brickbots

Problem

Settings → User Pref → Volume is defined unconditionally in python/PiFinder/ui/menu_structure.py:594, with no capability gate.

What is gated is the sound process, at python/PiFinder/main.py:555:

if capabilities.has_buzzer and hardware_platform == "Pi":

So on a v3 or v2.5 — which have no buzzer — the Volume menu item is present and selectable, changes sound_volume in the config, and produces no sound at any setting. There is nothing in the UI to say why.

Why it matters

A v3 owner who finds Volume reasonably concludes their PiFinder should make sounds, and that theirs is broken. It is a dead control on that hardware.

Options

  1. Gate the menu item on capabilities.has_buzzer, so it simply is not there on hardware that cannot use it. Cleanest, and matches how the sound process is already gated.
  2. Leave it visible but disabled/annotated. More discoverable for someone comparing revisions, but adds UI machinery for little gain.

Option 1 seems right unless there is a reason to keep the config key visible.

Note on dev builds

Under -fh the setting is also inert, which is expected and fine (the comment at main.py:551-553 explains there is no PWM to drive). This issue is specifically about real v3/v2.5 hardware.

Docs

Found while documenting the rev4 sound feature. The user guide currently notes the setting only does something on hardware with a buzzer — that note exists to paper over this, and could be dropped if the item gets gated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions