From 7ae7c48362a8078b96d1c84c0306b545a2ad5f8f Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 4 Apr 2019 11:49:44 +1100 Subject: [PATCH] AP_Compass: remove set_and_save_offsets taking integer parameters because the only caller that mattered had floats to offer... --- libraries/AP_Compass/AP_Compass.h | 11 ----------- .../examples/AP_Compass_test/AP_Compass_test.cpp | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/libraries/AP_Compass/AP_Compass.h b/libraries/AP_Compass/AP_Compass.h index 2bf49c4858..3be4687e75 100644 --- a/libraries/AP_Compass/AP_Compass.h +++ b/libraries/AP_Compass/AP_Compass.h @@ -179,17 +179,6 @@ public: /// void set_initial_location(int32_t latitude, int32_t longitude); - /// Program new offset values. - /// - /// @param i compass instance - /// @param x Offset to the raw mag_x value in milligauss. - /// @param y Offset to the raw mag_y value in milligauss. - /// @param z Offset to the raw mag_z value in milligauss. - /// - void set_and_save_offsets(uint8_t i, int x, int y, int z) { - set_and_save_offsets(i, Vector3f(x, y, z)); - } - // learn offsets accessor bool learn_offsets_enabled() const { return _learn == LEARN_INFLIGHT; } diff --git a/libraries/AP_Compass/examples/AP_Compass_test/AP_Compass_test.cpp b/libraries/AP_Compass/examples/AP_Compass_test/AP_Compass_test.cpp index 4a4d6dadd0..f0775ebe4e 100644 --- a/libraries/AP_Compass/examples/AP_Compass_test/AP_Compass_test.cpp +++ b/libraries/AP_Compass/examples/AP_Compass_test/AP_Compass_test.cpp @@ -42,7 +42,7 @@ static void setup() hal.console->printf("init done - %u compasses detected\n", compass.get_count()); // set offsets to account for surrounding interference - compass.set_and_save_offsets(0, 0, 0, 0); + compass.set_and_save_offsets(0, Vector3f(0, 0, 0)); // set local difference between magnetic north and true north compass.set_declination(ToRad(0.0f));