Search found 51 matches

by nvannote
Thu Oct 15, 2020 2:54 am
Forum: ESP-IDF
Topic: disable warnings as erros
Replies: 4
Views: 10613

Re: disable warnings as erros

I have done this with IDF in the past. In my case I was porting a library specifically as a component. After your idf_component_register, you can add a line... set_target_properties(${COMPONENT_LIB} PROPERTIES COMPILE_FLAGS -Wno-maybe-uninitialized) In my case, and perhaps you would like to do simil...
by nvannote
Wed Oct 14, 2020 5:03 pm
Forum: ESP-IDF
Topic: disable warnings as erros
Replies: 4
Views: 10613

Re: disable warnings as erros

The compiler flag your looking for is -Wno-maybe-uninitialized.

Best Regards
by nvannote
Thu Jul 16, 2020 7:43 pm
Forum: General Discussion
Topic: sscanf failure that does not make sense
Replies: 3
Views: 5889

Re: sscanf failure that does not make sense

Leading white space in a C Format string does not require a space, but it does allow for white-space to be there. A Format string of "%c" should return the first character in the provided input, which my well be white space and of no interest. A Format string of " %c" should return the first non-wh...
by nvannote
Thu Jul 16, 2020 2:48 am
Forum: General Discussion
Topic: sscanf failure that does not make sense
Replies: 3
Views: 5889

Re: sscanf failure that does not make sense

const char * ShortForm = "%c, 0x%x, %d, %d, %d" ; The following should work fine. Tested with clang, gcc and xtensa-gcc. const char * ShortForm = "%c, 0x%hX, %hd, %hd, %hd"; Your format string is specifying integers (32-bit on the ESP32), when your pointers are to shorts (16-bit). sscanf will do wh...
by nvannote
Sat Jul 04, 2020 9:38 pm
Forum: ESP-IDF
Topic: HTTP Restful Server Example Error
Replies: 3
Views: 5364

Re: HTTP Restful Server Example Error

Yes I agree, but it seems to me it is failing on the first iteration and the buffer size is way larger than the size of the requests coming through. As my edit above; I re-read the documentation for this httpd_req_recv. This is an odd little interface the way the documentation is written. But I did...
by nvannote
Sat Jul 04, 2020 8:44 pm
Forum: ESP-IDF
Topic: HTTP Restful Server Example Error
Replies: 3
Views: 5364

Re: HTTP Restful Server Example Error

while (cur_len < total_len) { printf("Receiving...\n"); received = httpd_req_recv(req, buf + cur_len, total_len); printf("Received: %d", received); if (received <= 0) { /* Respond with 500 Internal Server Error */ httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to post control val...
by nvannote
Thu Jul 02, 2020 12:46 am
Forum: ESP-IDF
Topic: Sharing code base between ESP32 and arduino
Replies: 3
Views: 4704

Re: Sharing code base between ESP32 and arduino

ESP_PLATFORM is defined. In addition there is the ESP_IDF_VERSION series of macros defined in esp_idf_version.h. ESP_IDF_VERSION_MAJOR, ESP_IDF_VERSION_MINOR, etc. https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/system.html?highlight=idf_version_major#id4 So you can ...
by nvannote
Sun Jun 28, 2020 11:12 am
Forum: General Discussion
Topic: Best sensor for detecting crossing a line [COVID]
Replies: 11
Views: 12004

Re: Best sensor for detecting crossing a line [COVID]

Anyway I am going to push my agenda - that it must always be possible to beat a mechanical solution (soz. nvannote) with software ;) I have a picture of the evolution of man; crouched to upright. The left most 'man' (most bent over) is the mechanical engineer whilst on the right hand side (most upr...
by nvannote
Sat Jun 27, 2020 10:23 am
Forum: General Discussion
Topic: Best sensor for detecting crossing a line [COVID]
Replies: 11
Views: 12004

Re: Best sensor for detecting crossing a line [COVID]

mazaira wrote:
Sat Jun 27, 2020 8:27 am
The problem that I'm trying to solve is to have a real-time system that will stop the next person to enter on a library/swimming pool. I don't think the mobile approach would work for it.

Turnstile? Problem solved. :D
by nvannote
Sat Jun 27, 2020 10:12 am
Forum: ESP-IDF
Topic: Wifi fails just after connected - C++
Replies: 19
Views: 17632

Re: Wifi fails just after connected - C++

KeithInAsia wrote:
Wed Jun 24, 2020 8:27 am
[FOUND THE ANSWER]

Right, As I said.

https://esp32.com/viewtopic.php?f=13&t=15950#p61364

Glad you figured it out.

Best Regards