projects
/
bno055.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ad3754
)
Fix array index in BNO055_tty_read().
author
Walter Fetter Lages
<w.fetter@ieee.org>
Sun, 27 Jan 2019 06:44:17 +0000
(
04:44
-0200)
committer
Walter Fetter Lages
<w.fetter@ieee.org>
Sun, 27 Jan 2019 06:44:17 +0000
(
04:44
-0200)
lib/bno055_tty.c
patch
|
blob
|
history
diff --git
a/lib/bno055_tty.c
b/lib/bno055_tty.c
index
1adfcc3
..
d27e1a7
100644
(file)
--- a/
lib/bno055_tty.c
+++ b/
lib/bno055_tty.c
@@
-108,7
+108,7
@@
s8 BNO055_tty_read(u8 dev_addr,u8 reg_addr,u8 *reg_data,u8 cnt)
if(length > BUFFER_LEN) length=BUFFER_LEN;
n=0;
while(n < length) if((n+=read(dev_addr,array+n,length-n))==-1) return BNO055_ERROR;
- for(i=0;i < cnt && i < length;i++) *(reg_data+i)=array[i
+2
];
+ for(i=0;i < cnt && i < length;i++) *(reg_data+i)=array[i];
break;
case BNO055_UART_ACK: