Browse Source

AP_Compass: remove set_and_save_offsets taking integer parameters

because the only caller that mattered had floats to offer...
mission-4.1.18
Peter Barker 6 years ago committed by Tom Pittenger
parent
commit
7ae7c48362
  1. 11
      libraries/AP_Compass/AP_Compass.h
  2. 2
      libraries/AP_Compass/examples/AP_Compass_test/AP_Compass_test.cpp

11
libraries/AP_Compass/AP_Compass.h

@ -179,17 +179,6 @@ public: @@ -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; }

2
libraries/AP_Compass/examples/AP_Compass_test/AP_Compass_test.cpp

@ -42,7 +42,7 @@ static void setup() @@ -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));

Loading…
Cancel
Save