Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no member named 'converterFunction' - Complilation fails #33

Closed
sighmon opened this issue Mar 13, 2024 · 6 comments
Closed

no member named 'converterFunction' - Complilation fails #33

sighmon opened this issue Mar 13, 2024 · 6 comments
Assignees

Comments

@sighmon
Copy link

sighmon commented Mar 13, 2024

Hi there,

I've just bought a Sparkfun ESP32-C6 to use with an Adafruit SCD30.

In the past I've had success building for an Adafruit ESP32-C3, but am running into these errors:

In file included from /Users/simos/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-3662303f31/esp32c6/include/bt/include/esp32c6/include/esp_bt.h:17,
                 from /Users/simos/Documents/Arduino/libraries/NimBLE-Arduino/src/NimBLEDevice.h:46,
                 from /Users/simos/Documents/Arduino/libraries/Sensirion_Gadget_BLE_Arduino_Lib/src/NimBLELibraryWrapper.cpp:2:
/Users/simos/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.1-3662303f31/esp32c6/include/bt/common/api/include/api/../../../../controller/esp32c6/esp_bt_cfg.h:19:10: fatal error: syscfg/syscfg.h: No such file or directory
   19 | #include "syscfg/syscfg.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: exit status 1

Guessing it was related to: h2zero/NimBLE-Arduino#642

I tried using this branch: https://github.com/h2zero/NimBLE-Arduino/tree/esp32-c6-test

In file included from /Users/simos/Documents/Arduino/libraries/Sensirion_Gadget_BLE_Arduino_Lib/src/AdvertisementHeader.h:34,
                 from /Users/simos/Documents/Arduino/libraries/Sensirion_Gadget_BLE_Arduino_Lib/src/DataProvider.h:34,
                 from /Users/simos/Documents/Arduino/libraries/Sensirion_Gadget_BLE_Arduino_Lib/src/Sensirion_Gadget_BLE.h:35,
                 from /Users/simos/Documents/Arduino/Sensirion_Example2_SCD30_BLE_Gadget/Sensirion_Example2_SCD30_BLE_Gadget.ino:1:
/Users/simos/Documents/Arduino/libraries/Sensirion_Gadget_BLE_Arduino_Lib/src/ByteArray.h:40:10: error: 'string' in namespace 'std' does not name a type
   40 |     std::string getDataString() {
      |          ^~~~~~
/Users/simos/Documents/Arduino/libraries/Sensirion_Gadget_BLE_Arduino_Lib/src/ByteArray.h:1:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
  +++ |+#include <string>
    1 | /*

exit status 1

Compilation error: exit status 1

So then I added #include <string> to Arduino/libraries/Sensirion_Gadget_BLE_Arduino_Lib/src/ByteArray.h

/Users/simos/Documents/Arduino/libraries/Sensirion_Gadget_BLE_Arduino_Lib/src/DataProvider.cpp: In member function 'void DataProvider::writeValueToCurrentSample(float, SignalType)':
/Users/simos/Documents/Arduino/libraries/Sensirion_Gadget_BLE_Arduino_Lib/src/DataProvider.cpp:42:50: error: 'std::map<SignalType, SampleSlot>::mapped_type' {aka 'struct SampleSlot'} has no member named 'converterFunction'
   42 |         _sampleConfig.sampleSlots.at(signalType).converterFunction;
      |                                                  ^~~~~~~~~~~~~~~~~

exit status 1

Compilation error: exit status 1
@qfisch
Copy link
Contributor

qfisch commented Mar 18, 2024

Hello @sighmon ,

What version of Sensirion_UPT_Core do you have installed ?
In 0.3.0 some changes have been made and BLE gadget is not compatible yet.

Q.

@qfisch qfisch self-assigned this Mar 18, 2024
@sighmon
Copy link
Author

sighmon commented Mar 18, 2024

@qfisch Thanks for the update. I've got:

  • Sensirion Core v0.6.0
  • Sensirion UPT Core v0.3.0

Is there a combination that I should be able to build with now? Or wait until BLE gadget is updated?

@qfisch
Copy link
Contributor

qfisch commented Mar 24, 2024

@sighmon :
You can get UPT Core 0.2.0 from the repository as a zip and load it into the Arduino IDE using "Load .Zip library"
That should allow you to continue with your project until we update this library

Q.

@qfisch qfisch changed the title Example2_SCD30_BLE_Gadget on a SparkFun Qwiic Pocket ESP32-C6 no member named 'converterFunction' - Complilation fails Mar 24, 2024
@qfisch
Copy link
Contributor

qfisch commented Mar 26, 2024

Hej @sighmon

in the end the changes were already done in code but were never released.
I created the version 1.3.0 which include the necessary changes to be compatible with the latest "UPT Core"

Q.

@qfisch qfisch closed this as completed Mar 26, 2024
@sighmon
Copy link
Author

sighmon commented Apr 4, 2024

@qfisch I'm still seeing this error when trying to compile with:

  • Sensirion Core 0.6.0
  • Sensirion UPT Core 0.3.0
  • Sensirion Gadget BLE Arduino Lib v1.3.0:
/Users/simos/Documents/Arduino/libraries/arduino-ble-gadget/src/ByteArray.h:40:10: error: 'string' in namespace 'std' does not name a type
   40 |     std::string getDataString() {
      |          ^~~~~~

@qfisch
Copy link
Contributor

qfisch commented Apr 4, 2024

@qfisch I'm still seeing this error when trying to compile with:

* Sensirion Core `0.6.0`

* Sensirion UPT Core `0.3.0`

* Sensirion Gadget BLE Arduino Lib `v1.3.0`:
/Users/simos/Documents/Arduino/libraries/arduino-ble-gadget/src/ByteArray.h:40:10: error: 'string' in namespace 'std' does not name a type
   40 |     std::string getDataString() {
      |          ^~~~~~

Hej @sighmon

Yes this release only solved the dependency issue with UPT Core.
We would need to look further at the usage of string within the lib...
For now adding #include <string> seems to be a reasonable workaround

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

No branches or pull requests

2 participants