Hey,
again thanks tuxduino that you are trying to help. Didn't know the AutoFormat Function, pretty cool ;).
Unfortunately, you, tuxduino, are not really getting my point.As some others may not got it either I like to explain:
- With the piece of code I posted above, I will get corrupted values (with a lot of -1 at the ends) and an array overflow
a.I should avoid that by only using the specified array size (What Tuxduino mentioned in his last post)
b. I should avoid/filter them using an if clause (What Tuxduino mentioned in the posts before)
to 1a. The piece of code I posted is just a quick and dirty code to have a fast read as a kind of "performance maximum". Therefore no if clauses and also no control of the array borders (I am not a coding pro, but I know these basics
)
to 1b. Right now, I am trying to get the max. command length possible, so I don't care about the lots of -1. So with my piece of code, which does only the most basic to read the serial, having a command length of 106 bytes already leads to a max buffer content of 45 bytes.... Having a command length >150 already leads to a buffer overflow, bytes of the commands are dropped, the command itself is unusable (Of course I have some functions to check whether the command is transmitted completely)
That leads me to my actual question:
-
either I am doing something wrong, so to say an inefficient way of reading or similar
-
or the "reading the serial" performance is just too slow for my requirements (I already considered splitting the 960 byte cmd I want to 3*320 e.g.)
3.Does increasing the serial buffer has some negative impact? I guess the buffer gets its memory of the SRAM?
So I would like to have some opinions on these 3 points. You are all welcome to leave it here ![]()
Thanks!