mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-03 04:03:59 -04:00
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().
This commit is contained in:
parent
84f811fe76
commit
9a2808a593
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user