OpenStickCommunity / OpenStickCommunity/GP2040-CE
Marco inputs occasionally doubling in Switch mode
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 666
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 7
Description
Expected Behavior
Macros should behave consistently between each loop of the macro
Current Behavior
A programed macro will occasionally repeat an input, causing issues in situation that require a precise sequence of inputs. For example, a macro that is programmed to execute the inputs [plus, left, A, A] will occasionally go [plus, plus, left, A, A]
Context
I was trying to make a macro to help me shiny hunt in the new Pokémon game on switch 2. In this game, it can be done simply by quick traveling to the same spot over and over, so all I need it to do is open the map, move the cursor slightly left, and then press the A button twice.
The macro I made works about 70% of the time, but the rest of the time one or more inputs got doubled. For example, it would press plus to open the map, then immediately press plus again to close it, or move the cursor left to the quick travel location, then move left again, moving the cursor away from the desired location.
I can't be certain, but it seems to happen after the "release and wait ___ frames". So a macro that would press A for 5 frames, wait for 30 frames, then press B for 5 frames, might instead press A for 5 frames, wait for 30 frames, press A for 5 frames, press B for 5 frames. Like I said though, I haven't done extensive testing of this.
Version
Pico-W (GP2040-CE_0.7.11_PicoW.uf2)
Current: v0.7.11
Latest: v0.7.11
Raspberry pi w
https://www.amazon.com/dp/B0B72GV3K3
Steps to Reproduce
- create a new macro with activation mode "toggle"
- enter the following into the "advanced" section
[{"buttonMask":512,"duration":83330,"waitDuration":333320},{"buttonMask":262144,"duration":83330,"waitDuration":333320},{"buttonMask":2,"duration":83330,"waitDuration":799968},{"buttonMask":2,"duration":83330,"waitDuration":3749850}] - run the macro in an environment where the inputs can be closely observed, preferably in Nintendo Switch mode, you should see inputs occasionally being repeated
Screenshots & Files
Please include any relevant screenshots, photos/recordings, or files here.
Here's a video of it working successfully once, then double-pressing plus
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the macro execution path for toggle activation, focusing on the release-and-wait timing described in the advanced macro steps. Reproduce the sequence in Nintendo Switch mode and compare repeated runs; done means the recorded inputs occur once per loop without duplicated presses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, raspberry-pi
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100