Skip to content

JSON/YAML/ENV incorrect output #410

@p3lim

Description

@p3lim

Description

When I query headsetcontrol -b I get the correct output:

Found 1 supported device(s):
 Audeze Maxwell (Audeze Maxwell Dongle) [0x3329:0x4b19]
Battery:
        Status: BATTERY_AVAILABLE
        Level: 86%

When I query headsetcontrol -o yaml (or json or env) I get an incorrect battery reading:

---
name: "HeadsetControl"
version:
api_version: "1.3"
hidapi_version: "0.14.0"
device_count: 1
devices:
  - status: "success"
    device: "Audeze Maxwell"
    vendor: "Audeze LLC"
    product: "Audeze Maxwell Dongle"
    id_vendor: "0x3329"
    id_product: "0x4b19"
    capabilities:
      - CAP_SIDETONE
      - CAP_BATTERY_STATUS
      - CAP_INACTIVE_TIME
      - CAP_EQUALIZER_PRESET
      - CAP_VOLUME_LIMITER
    capabilities_str:
      - sidetone
      - battery
      - inactive time
      - equalizer preset
      - volume limiter
    battery:
      status: "BATTERY_UNAVAILABLE"
      level: -1

This in turn makes the Gnome extension unable to function.

Running 3.1.0 from nixpkgs with the following override:

    (pkgs.headsetcontrol.overrideAttrs (old: {
      src = pkgs.fetchFromGitHub {
        owner = "Sapd";
        repo = "HeadsetControl";
        rev = "3.1.0";
        sha256 = "sha256-9LUqYV0MMTtlFYZCEn81kML5F46GDYWYwoKpO0UORcQ=";
      };
      # disable patch that was applied for 3.0.0 since it's been merged in 3.1.0
      patches = [];
    }))

I'd be more than happy to test PRs.

On which OS does the problem happen?

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions