Hey guys. Please reference https://github.com/AirmanEpic/teensy_dshot_simple which I'm using to code.
the problem is that reading from serial will stop the "Packet sending" which breaks the system I'm devising. So instead, it was decided to use timer interrupts to handle the packet sending while the serial handling was done in the main loop.
See line 49 through 52 in the code. This is where the serial commands are read.
I also added interrupt handling where the code received enters the flow, line 109 and 111.
However, when I run this, it will accept a single command before all subsequent commands are denied. I suspect this is because of the "Send single command" function on line 58. However, I've added a serial print in that code block and it will always print so it's not simply hanging there.
Anyone have any idea? Feel free to make PRs to the github too.
the problem is that reading from serial will stop the "Packet sending" which breaks the system I'm devising. So instead, it was decided to use timer interrupts to handle the packet sending while the serial handling was done in the main loop.
See line 49 through 52 in the code. This is where the serial commands are read.
I also added interrupt handling where the code received enters the flow, line 109 and 111.
However, when I run this, it will accept a single command before all subsequent commands are denied. I suspect this is because of the "Send single command" function on line 58. However, I've added a serial print in that code block and it will always print so it's not simply hanging there.
Anyone have any idea? Feel free to make PRs to the github too.