Skip to content

config.device.disable_triple_click is never read — implement or deprecate? #11784

Description

@rcarteraz

config.device.disable_triple_click (DeviceConfig field 10) exists in the protobuf but is never read by the firmware. Setting it has no effect.

Evidence (develop @ 784014e)

The only occurrences in the tree are the generated field itself:

  • src/mesh/generated/meshtastic/config.pb.h:441 (struct member), :864 (_tag), :994 (field X-macro)

No hand-written source references it, and git log -S"disable_triple_click" turns up no consumer anywhere in history.

What runs regardless

  1. src/input/InputBroker.cpp:437userConfigNoScreen.triplePress = INPUT_BROKER_GPS_TOGGLE, unconditional
  2. src/input/ButtonThread.cpp:85 — attaches the multi-click callback whenever triplePress != INPUT_BROKER_NONE
  3. src/input/ButtonThread.cpp:249-253 — dispatches _triplePress on a click count of 3
  4. src/modules/SystemCommandsModule.cpp:90 — toggles GPS, clearing the saved position when GPS was enabled and fixed_position is false

Scoping note: the binding at InputBroker.cpp:437 sits in the else branch of the HAS_SCREEN / if (screen) split, so triple-press-to-toggle-GPS only applies to screenless boards to begin with.

Question

Is this intentional, or an oversight? Since #10338 per-click actions are configurable through ButtonConfig, where "no triple action" is expressed as triplePress = INPUT_BROKER_NONE — which would supersede the boolean. So either:

  • (a) implement — guard line 437 with !config.device.disable_triple_click (leaving it INPUT_BROKER_NONE also skips the attachMultiClick), or
  • (b) deprecate — mark field 10 [deprecated = true] as was done for is_managed = 9, and remove it from the docs.

Either way the docs need updating: docs/configuration/radio/device.mdx currently documents it as functional, in both the "Disable Triple Click" section and the settings table.

Activity

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

Metadata

Metadata

Labels

bugSomething isn't workingcleanupCode cleanup or refactor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions