Some issues with the library & c++ #155
Closed
Suresh6060
started this conversation in
General
Replies: 1 comment 1 reply
-
If your string is defined as array of char, it is not surprising that you can't assign a single char |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use ESP32 to collect data and send it to stm32 for displaying as json string.
The characters are collected and processed on ESP32 itself and final string of characters send to stm32 over serial.
stm32 receives the string and has to be properly filled into char m[] . This is where the problems arises.
I can fill m[] manually like
m[0] = '\xD13' ;
m[1] = '\xD02' ;
m[2] = ' ' ;
m[3] = '\xD28' ;
m[4] = '\xD47' ;
m[5] = '\xD2E' ;
m[6] = '\xD3E' ;
m[7] = ' ' ;
m[8] = '\xD28' ;
m[9] = '\xD3E' ;
m[10] = '\xD30' ;
m[11] = '\xD3E' ;
m[12] = '\xD2F' ;
m[13] = '\xD23' ;
m[14] = '\xD3E' ;
m[15] = '\xD2F' ;
m[16] = '\0' ;
But whatever I tried , it seems to be impossible to do it dinamically from the json string received.
from the json string , I am able to retrieve the Hex codes like D13, D02....
But not able to assign it to m[0] and so on.
This is the last step , I am struggling with due to super strict c++. .
I can't change the datatype of char m[] too.
Is there any way to overcome this problem ?
Beta Was this translation helpful? Give feedback.
All reactions