Skip to content

Sweep the remaining hidpp event decoders onto the tolerant-decode pattern #382

Description

@AprilNEA

#381 fixed the highest-impact silent drops in the fork's receiver/feature listeners (0x41 connection kind, 0x54 pairing errors, 0x1d4b, smartshift_enhanced) using two patterns:

  • identity-only fields fold to Unknown via num_enum(default),
  • code-carrying fields keep the raw byte via num_enum(catch_all) Other(u8).

The remaining event decoders still drop a whole event when any single field byte is unrecognised (try_from(..).ok()? per field):

  • feature/crown/event.rs (~110-116) — a crown update with an unknown gesture loses the valid rotation deltas in the same payload
  • feature/extended_dpi/event.rs (~68, 73)
  • feature/reprog_controls/event.rs (~115)

Sweep these (and any others a fresh grep finds) onto the same two patterns, choosing per field whether it is identity-like (fold) or code-like (carry raw). Listener closures have no error channel, so tolerant typed fields are the only way to avoid data loss.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: hidppHID++ protocol and device feature supporttype: enhancementImprovement to existing functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions