Mar-26-2019, 03:03 PM
Well we don't necessarily have serial devices to test this. If you can re-frame your question with a hard-coded value that reproduces the issue without serial, that would be ideal.
Without digging in more, my only comment at this point is that something is off with your logic, you check the value of packet_ready and then inside that if-block you check it for a different value. That doesn't really make sense. It doesn't look like your newest code reproduces your original problem, you should make sure to include (1) your latest code and (2) the exact thing wrong with that code, including the exact stack trace associated with it.
Without digging in more, my only comment at this point is that something is off with your logic, you check the value of packet_ready and then inside that if-block you check it for a different value. That doesn't really make sense. It doesn't look like your newest code reproduces your original problem, you should make sure to include (1) your latest code and (2) the exact thing wrong with that code, including the exact stack trace associated with it.