Search found 11 matches
- Sat Apr 04, 2020 9:07 pm
- Forum: ESP-IDF
- Topic: Examples with copies of xQueueHandles
- Replies: 1
- Views: 3177
Examples with copies of xQueueHandles
Is it possible to create an xQueueHandle and send it into multiple tasks?
- Wed Mar 25, 2020 11:48 pm
- Forum: ESP-IDF
- Topic: Referencing .h and .cpp class files
- Replies: 4
- Views: 5118
Re: Referencing .h and .cpp class files
Thanks ESP_Sprite. I'd put the project away and was only recently able to return. I was able to do this with help from your comments. I ended up going to the CMakeLists.txt file and added the file names as below: set(COMPONENT_SRCS "example1.cpp" "example2.cpp" "main.cpp") set(COMPONENT_ADD_INCLUDED...
- Sun Jan 26, 2020 4:59 pm
- Forum: ESP-IDF
- Topic: Referencing .h and .cpp class files
- Replies: 4
- Views: 5118
Re: Referencing .h and .cpp class files
I'm not quite sure what you mean. Isn't the compilation and linking performed during the idf.py build/flash process? I'm not aware of any manual process that needs to be performed when creating a class.ESP_Sprite wrote: ↑Sun Jan 26, 2020 3:53 pmOne thing to check is if exampleClass.cpp is actually compiled and linked in.
- Sun Jan 26, 2020 2:57 am
- Forum: ESP-IDF
- Topic: Referencing .h and .cpp class files
- Replies: 4
- Views: 5118
Referencing .h and .cpp class files
I'm having trouble referencing class methods from the related .cpp file and hoping for some idea as to why it's failing. I've created an exampleClass with a .h file that includes: extern "C" { void app_main(void); } class exampleClass { public: void print(); private: }; and I've created the associat...
- Sun Dec 29, 2019 4:06 am
- Forum: General Discussion
- Topic: ESP32 Ints or Doubles to Strings
- Replies: 8
- Views: 16360
Re: ESP32 Ints or Doubles to Strings
Thanks PeterR and chegewara. Your suggestions led me to the gcvt function: https://www.geeksforgeeks.org/gcvt-conv ... -string-c/
- Tue Dec 24, 2019 3:11 pm
- Forum: General Discussion
- Topic: ESP32 Ints or Doubles to Strings
- Replies: 8
- Views: 16360
ESP32 Ints or Doubles to Strings
Does anyone have any luck in converting integers or doubles to strings in ESP32/esp-idf? Ideally, I'd like the function to work over an array of integers or doubles. I've tried using std::to_string(0) as a proof of concept but I get a compilation error: 'to_string' is not a member of 'std' std::to_s...
- Mon Dec 09, 2019 4:54 am
- Forum: ESP-IDF
- Topic: Class example C
- Replies: 6
- Views: 9262
Re: Class example C
C doesn't (natively) support classes, you probably want C++. How can I switch it to C++? rename your .c file to .cpp put : extern "C" { void app_main(void); } in your .cpp file near the top change cmakelists.txt to point at your new .cpp file instead of the old .c file set(COMPONENT_SRCS "./main.cp...
- Mon Dec 09, 2019 3:40 am
- Forum: ESP-IDF
- Topic: Class example C
- Replies: 6
- Views: 9262
Re: Class example C
How can I switch it to C++?ESP_Sprite wrote: C doesn't (natively) support classes, you probably want C++.
- Mon Dec 09, 2019 2:07 am
- Forum: ESP-IDF
- Topic: Class example C
- Replies: 6
- Views: 9262
Class example C
Is it possible to use classes when developing for the esp32? I can't seem to get the syntax correct when building the .h and .c files.
- Tue Sep 24, 2019 4:26 am
- Forum: ESP-IDF
- Topic: Strings and String Manipulation
- Replies: 3
- Views: 16028
Re: Strings and String Manipulation
Thanks for the reply markkuk. I had much better luck today with the strncat() and strcpy() functions. I did run into another problem that I'm hoping you can help me with. I am trying to send bytes over TCP using the socket send() function. I've noticed a problem when trying to send a byte with a val...