Stop warning users just because they shake a bit, be more strict to catch sensor failures or calibration errors in time

This commit is contained in:
Lorenz Meier 2014-07-11 16:03:27 +02:00
parent a118e8dbdd
commit 11d9724563
1 changed files with 3 additions and 6 deletions

View File

@ -644,14 +644,11 @@ int prearm_check(const struct vehicle_status_s *status, const int mavlink_fd)
if (ret == sizeof(acc)) { if (ret == sizeof(acc)) {
/* evaluate values */ /* evaluate values */
float accel_scale = sqrtf(acc.x * acc.x + acc.y * acc.y + acc.z * acc.z); float accel_magnitude = sqrtf(acc.x * acc.x + acc.y * acc.y + acc.z * acc.z);
if (accel_scale < 9.75f || accel_scale > 9.85f) { if (accel_magnitude < 4.0f || accel_magnitude > 15.0f /* m/s^2 */) {
mavlink_log_info(mavlink_fd, "#audio: Accel calib. recommended (%8.4f).", (double)accel_scale);
}
if (accel_scale > 30.0f /* m/s^2 */) {
mavlink_log_critical(mavlink_fd, "#audio: FAIL: ACCEL RANGE"); mavlink_log_critical(mavlink_fd, "#audio: FAIL: ACCEL RANGE");
mavlink_log_info(mavlink_fd, "#audio: hold still while arming");
/* this is frickin' fatal */ /* this is frickin' fatal */
failed = true; failed = true;
goto system_eval; goto system_eval;