From 9a2808a593c26e0b942964aff6815336337de26e Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Mon, 28 Sep 2015 16:56:17 -0300 Subject: [PATCH] AP_Arming: use compass get_{field,offsets}() functions Both functions are equivalent, so we're going to simply use get_{field,offsets}() instead of get_{field,offsets}_milligauss(). --- libraries/AP_Arming/AP_Arming.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Arming/AP_Arming.cpp b/libraries/AP_Arming/AP_Arming.cpp index ab47887544..91c42b7385 100644 --- a/libraries/AP_Arming/AP_Arming.cpp +++ b/libraries/AP_Arming/AP_Arming.cpp @@ -256,7 +256,7 @@ bool AP_Arming::compass_checks(bool report) } // check for unreasonable compass offsets - Vector3f offsets = _compass.get_offsets_milligauss(); + Vector3f offsets = _compass.get_offsets(); if (offsets.length() > 600) { if (report) { GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_CRITICAL, PSTR("PreArm: Compass offsets too high")); @@ -271,7 +271,7 @@ bool AP_Arming::compass_checks(bool report) #endif // check for unreasonable mag field length - float mag_field = _compass.get_field_milligauss().length(); + float mag_field = _compass.get_field().length(); if (mag_field > COMPASS_MAGFIELD_EXPECTED*1.65f || mag_field < COMPASS_MAGFIELD_EXPECTED*0.35f) { if (report) { GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_CRITICAL, PSTR("PreArm: Check mag field"));