oymotion / gForceSDKArduino

This is gForce software development kit (SDK) for Arduino.
Other
11 stars 9 forks source link

Is it possible to support this library for Arduino-ESP32 microcontrollers? #6

Closed RafaelSilvaUW closed 4 years ago

RafaelSilvaUW commented 5 years ago

When I try to compile for ESP32, using the Arduino IDE, it fails returning the following error... would be possible to add support to that board? Thank you!

Build options changed, rebuilding all WARNING: library gForceSDKArduino claims to run on (avr) architecture(s) and may be incompatible with your current board which runs on (esp32) architecture(s). In file included from /Users/eunaoquero/Documents/Arduino/libraries/gForceSDKArduino/src/gForceAdapterC.h:4:0, from /var/folders/lq/p6f64brj3zgfrzf8c1j999hr0000gp/T/arduino_modified_sketch_304580/SimpleControlByGestureC.ino:31: /Users/eunaoquero/Documents/Arduino/libraries/gForceSDKArduino/src/gForceDataTypes.h:14:20: error: redeclaration of 'OK' enum GF_Ret { OK = 0, ERR_PARAM = -1, TIME_OUT = -2, ERR_DATA = -3 }; ^ In file included from /Users/eunaoquero/Documents/Arduino/hardware/espressif/esp32/tools/sdk/include/freertos/freertos/FreeRTOSConfig.h:120:0, from /Users/eunaoquero/Documents/Arduino/hardware/espressif/esp32/tools/sdk/include/freertos/freertos/FreeRTOS.h:99, from /Users/eunaoquero/Documents/Arduino/hardware/espressif/esp32/cores/esp32/Arduino.h:32, from /var/folders/lq/p6f64brj3zgfrzf8c1j999hr0000gp/T/arduino_modified_sketch_304580/SimpleControlByGestureC.ino:30: /Users/eunaoquero/Documents/Arduino/hardware/espressif/esp32/tools/sdk/include/esp32/rom/ets_sys.h:630:5: note: previous declaration 'STATUS OK' OK = 0, ^ exit status 1 Error compiling for board SparkFun ESP32 Thing.

RafaelSilvaUW commented 5 years ago

By the way, I fixed this issue by refactoring the "OK" with "OKcustom"... the code compiled and uploaded fine, but it crashes on runtime and continuously reset the ESP32. Do you have any idea why this code is suitable just for the ARV architecture? Ot any tip on how I could port this code to that architecture myself? Thanks!

BigBro2014 commented 4 years ago

Yes, it's caused by name conflicts. We have fixed this, please update and try again. Thanks.