ken-voly opened a new pull request #4712: URL: https://github.com/apache/incubator-nuttx/pull/4712
## Summary `can_poll()` would indicated that there is no space in the TX FIFO when there is already one element in the FIFO. The calculation at https://github.com/apache/incubator-nuttx/blob/7183009400131d8764c3d9521b72c32369a04b15/drivers/can/can.c#L1132-L1141 should match the calculation at https://github.com/apache/incubator-nuttx/blob/7183009400131d8764c3d9521b72c32369a04b15/drivers/can/can.c#L801-L813 when determining if there is space in the FIFO (increment tail then compare with head). This is because new elements are added at the tail, not the head. ## Impact `can_poll()` now behaves correctly. More than one CAN frame can be inserted in to the FIFO when using `poll()` to check for space in the FIFO. ## Testing Tested on PX4. More than one frame can be written to the CAN driver at a time. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org