Search found 14 matches

by istokm
Fri Aug 07, 2020 6:59 am
Forum: ESP-IDF
Topic: Transferring STL containers using esp_event_post_to
Replies: 9
Views: 982

Re: Transferring STL containers using esp_event_post_to

Thank you for your suggestion, that would indeed work, and I've done components like that - but for this one I've found, that using a blocking function is quite easy to work with. Everything that uses events and callbacks will likely have to become quite a complicated state machine. Here's a snippet...
by istokm
Thu Aug 06, 2020 11:23 am
Forum: ESP-IDF
Topic: Using IDF and Arduino
Replies: 3
Views: 436

Re: Using IDF and Arduino

Current version of Arduino-ESP is built on top of ESP-IDF v3.2, so you can't just replace that for a newer version. There are a few 4.0 dev branches in arduino-esp, but I believe these functions got implemented in v4.1+, so I don't think there currently is a way to use those outside of the later ESP...
by istokm
Sat Aug 01, 2020 1:37 am
Forum: ESP-IDF
Topic: Transferring STL containers using esp_event_post_to
Replies: 9
Views: 982

Re: Transferring STL containers using esp_event_post_to

Your STL containers should be happy with that too. I use this a lot myself, mainly to take advantage of the events API with each component having its own base and without chewing through memory for a bunch of new event loop tasks. But I'm having a hard time finding documentation for it. Is it only ...
by istokm
Fri Jul 31, 2020 1:24 pm
Forum: ESP-IDF
Topic: Transferring STL containers using esp_event_post_to
Replies: 9
Views: 982

Re: Transferring STL containers using esp_event_post_to

If you can, would you like to share some context about your use case? Yep sure, all I'm doing is a esp_http_client wrapper, so that I don't have to worry about chunked data, initialization, configuration and error checking in every little project I (or others, if I release it) do - and cause modula...
by istokm
Fri Jul 31, 2020 9:22 am
Forum: ESP-IDF
Topic: Transferring STL containers using esp_event_post_to
Replies: 9
Views: 982

Re: Transferring STL containers using esp_event_post_to

Is it possible to dynamically allocate your data (e.g. http_message_t) on heap? I think this should work, you can initialize the stl container there and just have to make sure that it will be deleted upon event receiving. Unfortunately no, this is a public event, so the user would have a implicit r...
by istokm
Wed Jul 29, 2020 11:13 am
Forum: ESP-IDF
Topic: (solved) re-starting wifi
Replies: 4
Views: 624

Re: re-starting wifi

Highly doubtful. What I meant is, I just wanted to make sure it's not something as trivial as a forgotten break - not that the compiler screwed up :D First a esp_wifi_disconnect(), followed immediately by a esp_wifi_stop() I personally preffer only calling esp_wifi_stop (as it does both) but it sho...
by istokm
Wed Jul 29, 2020 8:47 am
Forum: ESP-IDF
Topic: Transferring STL containers using esp_event_post_to
Replies: 9
Views: 982

Re: Transferring STL containers using esp_event_post_to

I've just realized that any containers that include pointer types (char* in struct, etc) cannot be used, that is a very strict limitation of this implementation... A much better implementation would be to just treat the pointer like shared_ptr does, and free it once all event handlers exit - the use...
by istokm
Wed Jul 29, 2020 8:38 am
Forum: ESP-IDF
Topic: How does one suppress WiFi diagnostic output?
Replies: 2
Views: 357

Re: How does one suppress WiFi diagnostic output?

Indeed this is not a menuconfig option as far as I know. You'll want to read through this: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/log.html#how-to-use-this-library . But the TL;DR is that you can change the logging verbosity of different ESP modules like this...
by istokm
Tue Jul 28, 2020 7:26 am
Forum: ESP-IDF
Topic: (solved) re-starting wifi
Replies: 4
Views: 624

Re: re-starting wifi

Strange, that should indeed work. I've got a few ideas that you can look into: - by chance, is the switch falling through when it shouldn't? - do you have error checks on the other wifi functions? Just so we are sure there wasn't an error earlier in the chain. - how did you stop the wifi? just a 'es...
by istokm
Tue Jul 28, 2020 6:45 am
Forum: ESP-IDF
Topic: Transferring STL containers using esp_event_post_to
Replies: 9
Views: 982

Transferring STL containers using esp_event_post_to

Is there a feasible way of transferring STL containers (std::set, std::map, etc) using the esp_event_post_to? The specific container I want to transfer is http_message_t: typedef struct http_header_t { std::string key; std::string val; bool operator< (const http_header_t& x) const { return key < x.k...

Go to advanced search