Skip to content
Snippets Groups Projects
Commit b9fb6832 authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

INS: show calibration values on failure

this will help debug bad calibrations
parent e3f94963
No related branches found
No related tags found
No related merge requests found
...@@ -320,9 +320,13 @@ bool AP_InertialSensor::calibrate_accel(void (*delay_cb)(unsigned long t), void ...@@ -320,9 +320,13 @@ bool AP_InertialSensor::calibrate_accel(void (*delay_cb)(unsigned long t), void
} }
if (send_msg == NULL) { 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 { } 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 // restore original scaling and offsets
_accel_offset.set(orig_offset); _accel_offset.set(orig_offset);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment