mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-07 09:30:34 +08:00
Copy the correct number of bytes back for register read operations. Basic PX4IO comms are working now.
This commit is contained in:
@@ -233,7 +233,7 @@ rx_handle_packet(void)
|
||||
count = PKT_COUNT(dma_packet);
|
||||
|
||||
/* copy reply registers into DMA buffer */
|
||||
memcpy((void *)&dma_packet.regs[0], registers, count);
|
||||
memcpy((void *)&dma_packet.regs[0], registers, count * 2);
|
||||
dma_packet.count_code = count | PKT_CODE_SUCCESS;
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user