INS: show calibration values on failure

this will help debug bad calibrations
This commit is contained in:
Andrew Tridgell 2012-11-20 19:28:15 +11:00
parent a5ed0de2cf
commit 40fc0feaf9
1 changed files with 6 additions and 2 deletions

View File

@ -320,9 +320,13 @@ bool AP_InertialSensor::calibrate_accel(void (*delay_cb)(unsigned long t), void
}
if (send_msg == NULL) {
Serial.printf_P(PSTR("Calibration failed\n"));
Serial.printf_P(PSTR("Calibration failed (%.1f %.1f %.1f %.1f %.1f %.1f)\n"),
new_offsets.x, new_offsets.y, new_offsets.z,
new_scaling.x, new_scaling.y, new_scaling.z);
} else {
send_msg(PSTR("Calibration failed\n"));
send_msg(PSTR("Calibration failed (%.1f %.1f %.1f %.1f %.1f %.1f)\n"),
new_offsets.x, new_offsets.y, new_offsets.z,
new_scaling.x, new_scaling.y, new_scaling.z);
}
// restore original scaling and offsets
_accel_offset.set(orig_offset);