Skip to content

Feature: Support For Reversed Polarity HE Trigger Add-on#1609

Merged
arntsonl merged 16 commits intoOpenStickCommunity:mainfrom
j-wut:feature/he_trigger_polarity
Feb 23, 2026
Merged

Feature: Support For Reversed Polarity HE Trigger Add-on#1609
arntsonl merged 16 commits intoOpenStickCommunity:mainfrom
j-wut:feature/he_trigger_polarity

Conversation

@j-wut
Copy link
Copy Markdown
Contributor

@j-wut j-wut commented Feb 17, 2026

Reverse Polarity Support:

  1. Renamed some variables to make sense with polarity change (ie: pressed, instead of max)
  2. Renamed the Endpoints, getVoltage to get voltage, set Calibrations to set trigger settings.
  3. Logic for Reverse Polarity (doing a similar strategy to Pokemon trick room logic, subtracting compared voltages and thresholds from ADC_MAX before comparison)

Rapid Trigger Support:

  1. keeping state per channel for active state and previous voltage (to determine if the button is being pressed or released)
  2. using previous state and voltage to determine if gamepad state should be active or idle
  3. updating ui to add rapid trigger settings in calibration modal
  4. mirroring logic in ui to accurately represent if trigger will be active/inactive

Refactoring:

  1. Fixed some initialization in the he_triggers.h file
  2. additional refactoring of code in the HETrigger Addon UI (based on my code style preferences, feel free to give opinions, I am willing to change code style if you have a strong reason)

Test Evidence:
https://youtu.be/C1dSXA4BfJc
https://youtu.be/5awZCg9uq2s
https://youtube.com/shorts/bbVyIoNNNvQ

@j-wut j-wut force-pushed the feature/he_trigger_polarity branch from 5183035 to acf049e Compare February 17, 2026 17:41
@j-wut j-wut closed this Feb 19, 2026
@j-wut j-wut deleted the feature/he_trigger_polarity branch February 19, 2026 01:28
@j-wut j-wut restored the feature/he_trigger_polarity branch February 19, 2026 02:05
@j-wut j-wut reopened this Feb 19, 2026
@arntsonl
Copy link
Copy Markdown
Contributor

Tested my hardware including some new reverse polarity switches I got as well as rapid trigger testing.

Thank you for the submission @j-wut !!!

@arntsonl arntsonl merged commit 1423771 into OpenStickCommunity:main Feb 23, 2026
54 checks passed
arntsonl added a commit that referenced this pull request Mar 22, 2026
* 🇫🇷 Add French translation of the web interface. (#1518)

* Ajout de la traduction française

* Maj Traductions

* MAJ language ko-KR

* Corrections mineures et màj v.0.7.12

* Mise à jour de la traduction avant import de la traduction Turque

* Updated after the integration of the Turkish translation

---------

Co-authored-by: Luke A <arntsonl@gmail.com>

* Simplify build process for alternate configs (#1551)

* Updated CMakeLists.txt to include PICO_BOARD specific configs into the build process.

* Removed PicoW and RP2350 rule exceptions from CMake actions.
Introduced cmake files for PicoW and FlatboxRev8 configs.

* Changed PicoW build not use Pico2 config.

* Add new languages to checklocale (#1550)

* add tr-TR to checklocale

* add fr-FR to checklocale

* Make profile label render consistently when enabled switch is present (#1568)

Make profile render consistently when enabled switch is present

* Bump actions, inline pico-sdk build step, fix GCC MD5 mismatch issue (#1563)

* Add keyboard mappings to export/import (#1564)

* add more display macros (#1570)

Add more display macros for board configs.

* add display settings for osumgp-rp2040 (#1574)

* add more display macros

Add more display macros for board configs.

* add display settings for osumgp-rp2040

Add display settings for osumgp-rp2040 for use with SparkFun LCD-22495 which is non-standard size

* Add manual calibration feature for analog sticks (#1528)

feat: Add manual calibration feature for analog sticks

Features:
- Add independent manual calibration for analog sticks 1 and 2
- Implement 4-step calibration process (top-left, top-right, bottom-left, bottom-right)
- Add complete i18n support (English/Chinese) for calibration messages
- Support parameterized messages for dynamic content

Technical changes:
- Add joystick_center_x/y/x2/y2 fields to config proto
- Add manual calibration API endpoints (/api/getJoystickCenter, /api/getJoystickCenter2)
- Update analog input logic to support manual calibration values
- Add comprehensive frontend calibration interface with step-by-step guidance
- All code comments written in English as per project standards
- Clean code without duplicate comments or code blocks

Co-authored-by: Leonxis <leonxis@example.com>

* Change lock hotkeys switch to just be enabled similar to other toggles (#1558)

* Update PXPGamepad BoardConfig.h (#1567)

This fixes the default config for the second analog stick.
This is needed because of this change: #1401

* Add config for Haute42}COSMOX C-AT (#1579)

This PR adds a config for the Haute42}COSMOX C-AT

* update osumgp board config (#1582)

add FN button

* Add Switch Pro and XInput (Xbox 360) support to Gamepad USB Host add-on (#1573)

* Switch Pro USB Host implementation

Add support for the Switch Pro controller in the Gamepad USB host add-on.
Rumble, player LEDs work.

* Improve analog trigger driver consistency

Treat analog triggers >0 as digital enabled everywhere.

* Fix xinput host driver endpoint detection

Previously it did not indentify endpoint buffer sizes correctly.
Refactor the endpoint detection logic.
Add `tuh_xinput_wait_for_tx` function for blocking until report is sent off completely.

* XInput (Xbox 360) USB Host implementation

Add support for generic XInput controllers in the gamepad usb host add-on.
Rumble and player LED works.

* Move driver reports to appropriate descriptor files

Move rumble, LED, init reports to descriptor headers.

* TinyUSB host include hot-fix for main

* sdk 2.2.0 fixes (#1587)

* sdk 2.2.0 fixes

Update mbedtls functions and defines from v2 to v3 for pico sdk 2.2.0 support

* update github workflow

* update cmakelists version

* bump cmake version

incompatible cmake version - https://forums.raspberrypi.com/viewtopic.php?t=391251#p2334074

* issue 1086 (#1589)

add stick directions as hotkeys from issue #1086

* GCC fix for USB host + Vite update (#1602)

Fix for newer GCC's and switch struct. Fix for npx vite rather than vite (Windows compatible)

* update osumgp screen alignments (#1600)

* add brightness control (#1591)

* add brightness control

add display brightness control via webconfig, resolves issue 1536

* Change display brightness setting to be a slider

* fix narrowing warning

* Reverting package-lock.json changes

* add vcomh, rename brightness

Added option to adjust vcomh, setting the default value to 0x30. While previously default was 0x40, the datasheet does not show that as an available choice.

Renamed brightness to contrast to match datasheet as well.

* revert vcomh, fix contrast

reverted all the vcomh adjustments
fixed the contrast adjustment and lower limited to 15%

---------

Co-authored-by: Ian <ian@vidales.se>

* Add support for GP2040-CE as a PS4 auth provider (#1586)

Increases the size of the buffer used for storing the report
descriptor of the connected device and fixes the request length for
0xF3 GET_REPORT.

This lets us daisy chain controllers, plugging the auth dongle into
the last one in the chain.

* screen saver fixes (#1590)

have screen saver exit match entry

* issue 1373 (#1593)

fix for issue 1373

* fixes for 1496 & 1503, webconfig cleaning (#1601)

* fixes for 1496 & 1503, webconfig cleaning

fixes #1496
fixes #1503

and then some webconfig cleaning

* comment fixes

* Add display layouts for Haute42|COSMOX X-Move (#1595)

This PR adds three new board defined display layouts to the Haute42|COSMOX M Ultra config.

Those layouts are used for the new Haute42|COSMOX X-Move.  It will allow for all current combinations of modules for the X-Move:

1 - Stock config
2 - WASD module installed
3 - Joystick module installed

* Feature: Support For Reversed Polarity HE Trigger Add-on (#1609)

* change HE Trigger input to match HE Breakout Board layout

* support for flipped polarity HE Triggers

* fix modal title for calibrating switches

* fix polarity check

* upgrade to HE Trigger ui, to support configuration for Flipped Polarity

* renaming max to pressed, to make more sense with polarity

* fix headers and configs for polarity changes

* auto set polarity during simple calibration

* refactoring api and function names to better match what they are actually used for

* renaming methods used for progress bar component

* remove (not supported) from other locales

* rapid trigger support, todo: rebase

* fixing the voltage table, adding locales for english

* fix overwrite all, rename variable to release

* deprecate old polarity value, (previous value was set incorrectly)
rename sensitivity to noise, better describe how it's used.

* fix for calibrate all, should pull current state for entire trigger, incase they want to use manual calibration

* Fix web server response corruption (#1614)

Fix web server response corruption by managing dynamic memory for return data

* Adding flip polarity to the "Calibrate All" (#1615)

Adding flip polarity to the "Calibrate All" feature to make it easier to configure a mixed set of switches

* Fix Protobuf and GCC actions (#1622)

* Fixes an issue with setuptools >= 82.0.0 breaking pkg_resources in protobuf

* Also fixing arm-non-eabi-gcc-action while we're at it

---------

Co-authored-by: MM Workshop <mikael@mmwork.shop>
Co-authored-by: Mike Parks <mikepparks@gmail.com>
Co-authored-by: mizma <omoikane@path-works.net>
Co-authored-by: Pelsin <ian@vidales.se>
Co-authored-by: NickGuyver <akaguy@gmail.com>
Co-authored-by: leonxis <31850137+leonxis@users.noreply.github.com>
Co-authored-by: Leonxis <leonxis@example.com>
Co-authored-by: MegaBitmap <93689649+MegaBitmap@users.noreply.github.com>
Co-authored-by: TheTrain <32771064+TheTrainGoes@users.noreply.github.com>
Co-authored-by: grialion <48643945+grialion@users.noreply.github.com>
Co-authored-by: Jacek Fedoryński <jfedor@jfedor.org>
Co-authored-by: Jam <jwut@jwut.dev>
Co-authored-by: mattaaron79 <mattaaron79@gmail.com>
mizma added a commit to mizma/GP2040-CE that referenced this pull request Mar 27, 2026
* Fix Layout with HETrigger Voltage table to make translation legible
* Added a Common label for Status Enabled/Disabled text for use in rapid
	trigger table
* Fixed some Japanese button trigger terminology to match common use.
@mizma mizma mentioned this pull request Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants