ESP32-BLE-Gamepad icon indicating copy to clipboard operation
ESP32-BLE-Gamepad copied to clipboard

[WIP] Merge blueDroid and nimBLE version into single codebase

Open LeeNX opened this issue 1 year ago • 4 comments

Possible covers #142

@lemmingDev how does this look as a PR for you?

I think there are three places would be nice to make cleaner, setBatteryLevel section, BLECharacteristic read section and auth section.

Compile works for setBatteryLevel sketch for both stacks, further testing to follow.

LeeNX avatar Oct 22 '23 16:10 LeeNX

Great job! @LeeNX

Haven't had much motivation to add new features to this library recently

With the re-addition of blueDroid into master as an option, simultaneous BLE/Classic BT communication may once again be an option. Sim racers rejoice...

I guess readme should get updated too. Any interest in that? You could then say wonderful things about your recent contributions ;)

Not sure if the -lnx on the end of the version number would stuff up the Arduino library auto-download thingy?

lemmingDev avatar Oct 26 '23 09:10 lemmingDev

Thanks @lemmingDev , still a work in progress. Seems my initial testing was flawed and still need some work. I was hoping that we could do the #define USE_NIMBLE in the sketch, so that the bluetooth stack was selectable at compile time per project, but that is not the case, as least not in my testing. Plus the nimBLE code is failing

~/Documents/Arduino/libraries/ESP32-BLE-Gamepad/BleGamepad.cpp:20:
~/Documents/Arduino/libraries/ESP32-BLE-Gamepad/BleGamepad.h:62:5: error: 'NimBLEHIDDevice' does not name a type; did you mean 'NimBLEDevice'?
     NimBLEHIDDevice *hid;
     ^~~~~~~~~~~~~~~
     NimBLEDevice
~/Documents/Arduino/libraries/ESP32-BLE-Gamepad/BleGamepad.cpp: In constructor 'BleGamepad::BleGamepad(std::__cxx11::string, std::__cxx11::string, uint8_t)':
~/Documents/Arduino/libraries/ESP32-BLE-Gamepad/BleGamepad.cpp:76:104: error: class 'BleGamepad' does not have any field named 'hid'

Once I work them out or if somebody knows how to fix, that would be a great help.

LeeNX avatar Oct 26 '23 10:10 LeeNX

Any progress on this?

lemmingDev avatar Feb 23 '24 19:02 lemmingDev

Any progress on this?

Sadly no. Been poking at adding charge status, but failing at that too.

LeeNX avatar Feb 26 '24 07:02 LeeNX