-
I implemented option 2 (with original KM271) and ESP32. But why am I not getting any readings? Does it take a long time to see values or is there a defect? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hi, that is interesting. I had a similar behavior in the past. Are you using the latest version? the function is located in basic.cpp: const char* uint8ToString(uint8_t value){
static char ret_str[4];
snprintf(ret_str, sizeof(ret_str), "%hhu", value);
return ret_str;
} In your setup there must be some difference regarding the data types and the formatting of the printf. I think I must find a different solution for that conversions from number to string that is more robust. |
Beta Was this translation helpful? Give feedback.
-
thank you, very much, this one worked: const char* uint8ToString(uint8_t value){ info: i have this board: |
Beta Was this translation helpful? Give feedback.
-
hi Sven, thank you so much, yes, some values are declared with "hi", see my screenshots. |
Beta Was this translation helpful? Give feedback.
ok, its pretty clear that in your setup the 3-sign format specifier (hhi, hhu, llu) are not supported, even if this should be the right ones.
A format specifier %hhi result in printing hi, %hhu result in printing hu and %llu result in printing lu
Also if you use the combination with <inttypes.h> and the generic format specifier it seems that they are replaced with (hhi, hhu, llu) by the compiler that do not work.
I will change the functions to the "basic" format specifier (%u and %i) and hope that this will work for everyone else as well.
For the 64bit value, I will implement a manual way.