aboutsummaryrefslogtreecommitdiff
path: root/src/modules/px4iofirmware/serial.c
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-07-06 00:00:44 -0700
committerpx4dev <px4@purgatory.org>2013-07-06 00:00:44 -0700
commit19b2e1de8505be6ab23bedab7b105a20ac7af405 (patch)
treeb96cd0b356afb661157c1e96040635636c42359a /src/modules/px4iofirmware/serial.c
parent0589346ce6ccbcee03437ee293cc03d900bf76d9 (diff)
downloadpx4-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/serial.c')
-rw-r--r--src/modules/px4iofirmware/serial.c2
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;