Search found 11 matches

by policeman0077
Thu Feb 01, 2024 2:34 am
Forum: ESP-IDF
Topic: call xTimerStop() too often cause "assert failed: prvProcessReceivedCommands timers.c:858 (xResult)" error and restart
Replies: 2
Views: 1110

Re: call xTimerStop() too often cause "assert failed: prvProcessReceivedCommands timers.c:858 (xResult)" error and resta

Thank you MicroController for your reply. I will have a look the xTimer queue and command.
The circuit has a rc filter and a schmitter trigger for debouncing and the firmware checks if two consecutive interrupts is within 20ms.
by policeman0077
Tue Jan 30, 2024 5:53 pm
Forum: ESP-IDF
Topic: what is the return value of sockect close() function
Replies: 2
Views: 1501

Re: what is the return value of sockect close() function

ESP_Sprite wrote:
Sun Jul 09, 2023 1:33 am
Close is a posix function; if it returns -1, there has been an error. I think you can do this to get the specifics:

Code: Select all

#include <stdio.h>

[...]

if (close(..)==-1) {
	perror("close");
}
Thank you. I will try your code. :D
by policeman0077
Tue Jan 30, 2024 5:44 pm
Forum: ESP-IDF
Topic: call xTimerStop() too often cause "assert failed: prvProcessReceivedCommands timers.c:858 (xResult)" error and restart
Replies: 2
Views: 1110

call xTimerStop() too often cause "assert failed: prvProcessReceivedCommands timers.c:858 (xResult)" error and restart

We have several robots have wonky limit switches which always pull high. So I put some code that when the robot move away from the end stop(limit switch from triggered state to release), I start a timer and wait for the release of the switch(interrupt). If robot detects the release(interrupt), it st...
by policeman0077
Fri Aug 18, 2023 5:48 pm
Forum: IDEs for ESP-IDF
Topic: Build & Flash without Launching monitor?
Replies: 2
Views: 7221

Re: Build & Flash without Launching monitor?

ctrl + e + b then ctrl + e + f
or
you can write a custom task using compound tasks
https://code.visualstudio.com/docs/edi ... ound-tasks
by policeman0077
Fri Aug 18, 2023 9:38 am
Forum: IDEs for ESP-IDF
Topic: Can I display how long the build task takes in vscode extension?
Replies: 2
Views: 11470

Can I display how long the build task takes in vscode extension?

Is there a way to display how long the compilation took?
One way I could thinks about is use idf.preBuildTask and idf.postBuildTask to record start and end time. Is there better way? Or idf.py already have build-in functions I didn't found
thanks.
by policeman0077
Thu Aug 03, 2023 11:18 pm
Forum: ESP-IDF
Topic: Proper way to handle WiFi reconnect
Replies: 0
Views: 6908

Proper way to handle WiFi reconnect

I saw in programming guide about esp_wifi_connect(): 3. The scanning triggered by esp_wifi_scan_start() will not be effective until connection between ESP32 and the AP is established. If ESP32 is scanning and connecting at the same time, ESP32 will abort scanning and return a warning message and err...
by policeman0077
Sat Jul 08, 2023 5:06 pm
Forum: ESP-IDF
Topic: what is the return value of sockect close() function
Replies: 2
Views: 1501

what is the return value of sockect close() function

I am new to socket programming. what is the return value of sockect close() function. I could not find in https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/lwip.html?highlight=lwip. I always get -1 as return of close(). I have SO_REUSEADDR enabled. Is it safe to reconnect use th...
by policeman0077
Sat Apr 02, 2022 1:42 pm
Forum: IDEs for ESP-IDF
Topic: Unable to list serial ports in VS Code on Windows
Replies: 3
Views: 5306

Re: Unable to list serial ports in VS Code on Windows

seems new macos update deleted python 2.7 so the extension_env can not find it.
I deleted files in .espressif/python_env and then the idf extension could be reconfiged
by policeman0077
Sat Apr 02, 2022 1:05 pm
Forum: IDEs for ESP-IDF
Topic: Unable to list serial ports in VS Code on Windows
Replies: 3
Views: 5306

Re: Unable to list serial ports in VS Code on Windows

I have same problem. I am on Mac and the extension version is 1.4.0
log is attached