AP_Compass: remove set_and_save_offsets taking integer parameters

because the only caller that mattered had floats to offer...
This commit is contained in:
Peter Barker 2019-04-04 11:49:44 +11:00 committed by Tom Pittenger
parent a6755b6406
commit 7ae7c48362
2 changed files with 1 additions and 12 deletions

View File

@ -179,17 +179,6 @@ public:
/// ///
void set_initial_location(int32_t latitude, int32_t longitude); 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 // learn offsets accessor
bool learn_offsets_enabled() const { return _learn == LEARN_INFLIGHT; } bool learn_offsets_enabled() const { return _learn == LEARN_INFLIGHT; }

View File

@ -42,7 +42,7 @@ static void setup()
hal.console->printf("init done - %u compasses detected\n", compass.get_count()); hal.console->printf("init done - %u compasses detected\n", compass.get_count());
// set offsets to account for surrounding interference // 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 // set local difference between magnetic north and true north
compass.set_declination(ToRad(0.0f)); compass.set_declination(ToRad(0.0f));