iSkipper-Software icon indicating copy to clipboard operation
iSkipper-Software copied to clipboard

Printing in ISR

Open wizard97 opened this issue 6 years ago • 2 comments

I quickly looked at your Arduino sketch and noticed that you are printing over Serial in your packet handlers. The packet handlers run in an ISR, and printing over Serial in an ISR is undefined behavior.

wizard97 avatar Jan 17 '19 20:01 wizard97

Yeah actually I've found that there are some wired things happens to my Arduino Sketch when replacing answers. But it seems to be normal when capturing and sending. Anyway, I am going to refactor the entire sketch. As you might noticed, current sketch is messy and hard to modify (:зゝ∠). I'll let you know when I finish refactor. Thank you very much for this notice. I didn't know this before.

charlescao460 avatar Jan 18 '19 00:01 charlescao460

I've re-written the entire sketch in #5. It should work fine.

charlescao460 avatar Jun 02 '19 04:06 charlescao460