Search found 123 matches
- Tue Feb 22, 2022 1:58 pm
- Forum: ESP-IDF
- Topic: MQTT client msg_id is always 0?
- Replies: 2
- Views: 2415
MQTT client msg_id is always 0?
What is the use of event->msg_id in the exposed mqtt event loop? I have tested multiple messages in a row and it always seems to be 0.. Is this the expected behaviour? I was thinking it might be some kind of counter that increases with every message sent?
- Sat Feb 12, 2022 10:17 am
- Forum: ESP-IDF
- Topic: Copying notification value from other to own task
- Replies: 0
- Views: 997
Copying notification value from other to own task
I'm using the TaskNotification - API as a lightweight event group. Now I want to listen to some state changes in an event loop but not miss out on state changes that already happened. Thus I want to copy the preexisting ulValue from another known task. Can this be done in the way specified below? 1)...
- Sat Feb 12, 2022 10:11 am
- Forum: ESP-IDF
- Topic: Get handle of this task?
- Replies: 2
- Views: 3178
Re: Get handle of this task?
Thank you it seems to work well!
- Wed Jan 26, 2022 6:37 am
- Forum: ESP-IDF
- Topic: Get handle of this task?
- Replies: 2
- Views: 3178
Get handle of this task?
I can't seem to find a way to get the handle of the currently running task (the one that I'm calling a function out of).
I want to have an API where I call a function and the function reads out the task context and puts itself (its handle) into an std::map. Is this possible somehow?
I want to have an API where I call a function and the function reads out the task context and puts itself (its handle) into an std::map. Is this possible somehow?
- Mon Dec 13, 2021 6:54 am
- Forum: ESP-IDF
- Topic: Choosing flag in bottleneck function: bool or int?
- Replies: 3
- Views: 5904
Re: Choosing flag in bottleneck function: bool or int?
Thanks for your hint. I'm a bit of a noob in looking at assembler code. How do I do that for the xtensa compiler? I know I can use godbolt for all desktop compilers, but for the extensa one I would have to look into the obj files?
- Sat Nov 27, 2021 5:06 pm
- Forum: ESP-IDF
- Topic: Choosing flag in bottleneck function: bool or int?
- Replies: 3
- Views: 5904
Choosing flag in bottleneck function: bool or int?
I have very hot code that I want to optimize as far as possible. If I have the choice between bool or int flags, what should I choose when coding with C++ for the xtensa-compiler?
https://stackoverflow.com/questions/576 ... l-or-ifint
https://stackoverflow.com/questions/576 ... l-or-ifint
- Wed Nov 24, 2021 10:30 am
- Forum: ESP-IDF
- Topic: Using more than 24 bits in EventGroups
- Replies: 7
- Views: 9841
Re: Using more than 24 bits in EventGroups
I've just had another idea: - Divide all event groups into logical groups. - Use one toplevel eventgroup which contains BITS corresponding to the subgroups. The idea is that tasks only listen to the toplevel eventgroup. And when bits change this is representative of one bit changing within that resp...
- Sat Nov 20, 2021 8:43 am
- Forum: ESP-IDF
- Topic: Using more than 24 bits in EventGroups
- Replies: 7
- Views: 9841
Re: Using more than 24 bits in EventGroups
The thing is I'm trying to use event bits to synchronise across mulitple threads as part of a state machine. Some states wait for others to establish and one task could free multiple other tasks. I can't make it part of the API that one module must "know" about every other thread that is waiting for...
- Fri Nov 19, 2021 9:31 am
- Forum: ESP-IDF
- Topic: Using more than 24 bits in EventGroups
- Replies: 7
- Views: 9841
Re: Using more than 24 bits in EventGroups
Thanks I almost thought so. What I figured could work was if I could simultanously check bits from multiple event groups and have the thread on hold until one of the bits is set. Is that possible somehow?
- Fri Nov 19, 2021 9:27 am
- Forum: General Discussion
- Topic: Error compiling code version 4.0 ESP - IDF
- Replies: 1
- Views: 4703
Re: Error compiling code version 4.0 ESP - IDF
This happens sometimes if you switch the repo in between builds.
Run idf.py fullclean and idf.py build again. This solved the problem for me.
Run idf.py fullclean and idf.py build again. This solved the problem for me.