What should the sscanf function count in this case?
sscanf(gBufRx, "%hu", &x); A string of the form xxx or 0xx (decimal) is transmitted. x - unsigned short .
I would check, but the program is on the controller and there is no way to see what is going on there.
It seems that if you transmit a string of the form xxx (for example, 155), then everything is fine, and if the first is 0 (for example, 090), then a large number is read. What is wrong with me?