From 9b42a97de95f1ccb44881c0ab1166e6d194dfebf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 12 Nov 2012 10:28:06 +1100 Subject: [PATCH] AP_Compass: print I2C error count in test sketch --- .../AP_Compass/examples/AP_Compass_test/AP_Compass_test.pde | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Compass/examples/AP_Compass_test/AP_Compass_test.pde b/libraries/AP_Compass/examples/AP_Compass_test/AP_Compass_test.pde index 8f97a7cc34..3e949b0525 100644 --- a/libraries/AP_Compass/examples/AP_Compass_test/AP_Compass_test.pde +++ b/libraries/AP_Compass/examples/AP_Compass_test/AP_Compass_test.pde @@ -99,11 +99,12 @@ void loop() offset[2] = -(max[2]+min[2])/2; // display all to user - Serial.printf("Heading: %.2f (%3u,%3u,%3u) ", + Serial.printf("Heading: %.2f (%3u,%3u,%3u) I2cerr=%u ", ToDeg(heading), compass.mag_x, compass.mag_y, - compass.mag_z); + compass.mag_z, + I2c.lockup_count()); // display offsets Serial.printf("\t offsets(%.2f, %.2f, %.2f)",