diff options
author | px4dev <px4@purgatory.org> | 2013-07-06 00:00:44 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-07-06 00:00:44 -0700 |
commit | 19b2e1de8505be6ab23bedab7b105a20ac7af405 (patch) | |
tree | b96cd0b356afb661157c1e96040635636c42359a /src/modules/px4iofirmware | |
parent | 0589346ce6ccbcee03437ee293cc03d900bf76d9 (diff) | |
download | px4-firmware-19b2e1de8505be6ab23bedab7b105a20ac7af405.tar.gz px4-firmware-19b2e1de8505be6ab23bedab7b105a20ac7af405.tar.bz2 px4-firmware-19b2e1de8505be6ab23bedab7b105a20ac7af405.zip |
Copy the correct number of bytes back for register read operations. Basic PX4IO comms are working now.
Diffstat (limited to 'src/modules/px4iofirmware')
-rw-r--r-- | src/modules/px4iofirmware/serial.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/px4iofirmware/serial.c b/src/modules/px4iofirmware/serial.c index b91819373..f19021d8c 100644 --- a/src/modules/px4iofirmware/serial.c +++ b/src/modules/px4iofirmware/serial.c @@ -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; |