Skip to content

Update devBLE.cpp -disable hat on BLE HID device - #3561

Merged
mha1 merged 1 commit into
ExpressLRS:masterfrom
pitts-mo:patch-1
Mar 1, 2026
Merged

mha1 merged 1 commit into
ExpressLRS:masterfrom
pitts-mo:patch-1

Conversation

@pitts-mo

@pitts-mo pitts-mo commented Feb 27, 2026 •

Copy link
Copy Markdown
Contributor

Disables the hat device in ESP32-BLE-Gamepad.

Unity Input System is known to be problematic / crash when detecting generic HID devices especially when a generic HID device includes a hat... ELRS is not currently using the hat anyway.

Disables the hat device in ESP32-BLE-Gamepad. 

Unity Input System is known to be problematic / crash when detecting generic HID devices especially when a generic device HID device that includes a hat... ELRS is not currently using the hat anyway.
@pitts-mo

pitts-mo commented Feb 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Note:
In my prior testing unity would crash when detecting the BLE Joystick and leave the windows joystick unresponsive. I needed to remove and re-add the bluetooth device each time. Since this fix I have not seen a single instance of unity crash but after leaving my controller/unity idle for an extended period it appears I did hit one new instance where unity left the BLE Joystick unresponsive to windows. Prior to testing with unity I have never seen these happen when using ELRS BLE Joystick with other apps.

update: after testing with another unity app for a couple more hours this has not happened again.

@pitts-mo

Copy link
Copy Markdown
Contributor Author

This was interesting and includes a workaround for Unity Input System w/OpenXR: lemmingDev/ESP32-BLE-Gamepad#292

@pkendall64
pkendall64 requested a review from mha1 March 1, 2026 00:28
@pkendall64

Copy link
Copy Markdown
Collaborator

@mha1 I'm adding you as a reviewer as you were having issues with the PA01 on bluetooth from memory...

@mha1 mha1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR fixes a problem with BLE Joysticks used with games/simulators built with the Unity game engine. It doesn't fix the PA01 BLE problem.

I'm approving this based on user feedback https://discord.com/channels/596350022191415318/797109686285107241/1477193906126061609

@mha1
mha1 merged commit cc0ff90 into ExpressLRS:master Mar 1, 2026
26 checks passed
@pkendall64

Copy link
Copy Markdown
Collaborator

This PR fixes a problem with BLE Joysticks used with games/simulators built with the Unity game engine. It doesn't fix the PA01 BLE problem.

Bugger!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants