AP_Compass: tidy constructor

This commit is contained in:
Peter Barker 2019-11-22 17:24:29 +11:00 committed by Andrew Tridgell
parent 03064f8eea
commit 8fac70149d
2 changed files with 2 additions and 5 deletions

View File

@ -73,9 +73,7 @@ extern const AP_HAL::HAL& hal;
///////////////////// PUBLIC INTERFACE /////////////////////
////////////////////////////////////////////////////////////
CompassCalibrator::CompassCalibrator():
_tolerance(COMPASS_CAL_DEFAULT_TOLERANCE),
_sample_buffer(nullptr)
CompassCalibrator::CompassCalibrator()
{
stop();
}

View File

@ -5,7 +5,6 @@
#define COMPASS_CAL_NUM_SPHERE_PARAMS 4
#define COMPASS_CAL_NUM_ELLIPSOID_PARAMS 9
#define COMPASS_CAL_NUM_SAMPLES 300 // number of samples required before fitting begins
#define COMPASS_CAL_DEFAULT_TOLERANCE 5.0f // default RMS tolerance
#define COMPASS_MIN_SCALE_FACTOR 0.85
#define COMPASS_MAX_SCALE_FACTOR 1.3
@ -170,7 +169,7 @@ private:
// values provided by caller
float _delay_start_sec; // seconds to delay start of calibration (provided by caller)
bool _retry; // true if calibration should be restarted on failured (provided by caller)
float _tolerance; // worst acceptable tolerance (aka fitness). see set_tolerance()
float _tolerance = 5.0; // worst acceptable RMS tolerance (aka fitness). see set_tolerance()
uint16_t _offset_max; // maximum acceptable offsets (provided by caller)
// behavioral state