OpenStickCommunity / OpenStickCommunity/GP2040-CE

Adding invert option to focus mode.

Open
#1,671 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
2.5k
Forks
667
Avg merge
1d 19h
Merged PRs (30d)
7

Description

Problem

Short version: add a toggle to let focus mode to be enabled by open rather than short.

Long version:
Image

I bought a comically oversized switch with a hat on it, cut a hole through my fight stick, then installed it. I realized too late that I can't flip the hat around on the switch to force short by default. There's a notch on one side only, forcing short by flipping upwards.

I wanted a switch that forces me to flip it to have access to HOME/START, instead the hat forces me to flip it to enable tournament lockout.

Solution

Enable a toggle setting that forces focus mode on open rather than short.

Do you plan to work on this feature yourself?

I already have a fork for this:

One more thing: I thought of extending this across all GPIO pin; I haven't looked at the arch of the repo yet to see if this is feasible. My current source uses the mask of the focus button to invert the outcome of (debouncedGpio & focusModeMask). This could be generally applied to all buttons mapped by the user. Maybe have a GUI that declares all GPIO they'd like inverted?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the focus-mode handling and the focus button mask in the repository, then compare it with the behavior described in the linked fork. Determine where a setting can invert focus mode so it is enabled by the open switch state; done means the toggle works reliably without changing the default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
54/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.