Skip to content

Commit 82b6a5c

Browse files
authored
Merge pull request #19 from fm4dd/master
fix misscounted byte position in command response
2 parents 90dd9ad + f69e105 commit 82b6a5c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/SparkFun_BNO080_Arduino_Library.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,15 @@ bool BNO080::dataAvailable(void)
176176
//shtpData[2]: Command
177177
//shtpData[3]: Command Sequence Number
178178
//shtpData[4]: Response Sequence Number
179-
//shtpData[4 + 0]: R0
180-
//shtpData[4 + 1]: R1
181-
//shtpData[4 + 2]: R2
182-
//shtpData[4 + 3]: R3
183-
//shtpData[4 + 4]: R4
184-
//shtpData[4 + 5]: R5
185-
//shtpData[4 + 6]: R6
186-
//shtpData[4 + 7]: R7
187-
//shtpData[4 + 8]: R8
179+
//shtpData[5 + 0]: R0
180+
//shtpData[5 + 1]: R1
181+
//shtpData[5 + 2]: R2
182+
//shtpData[5 + 3]: R3
183+
//shtpData[5 + 4]: R4
184+
//shtpData[5 + 5]: R5
185+
//shtpData[5 + 6]: R6
186+
//shtpData[5 + 7]: R7
187+
//shtpData[5 + 8]: R8
188188
void BNO080::parseCommandReport(void)
189189
{
190190
if (shtpData[0] == SHTP_REPORT_COMMAND_RESPONSE)
@@ -194,7 +194,7 @@ void BNO080::parseCommandReport(void)
194194

195195
if(command == COMMAND_ME_CALIBRATE)
196196
{
197-
calibrationStatus = shtpData[4 + 0]; //R0 - Status (0 = success, non-zero = fail)
197+
calibrationStatus = shtpData[5 + 0]; //R0 - Status (0 = success, non-zero = fail)
198198
}
199199
}
200200
else

0 commit comments

Comments
 (0)