diff --git a/libraries/AP_Compass/AP_Compass_SITL.cpp b/libraries/AP_Compass/AP_Compass_SITL.cpp index 8d2e6d9929..1948c9d315 100644 --- a/libraries/AP_Compass/AP_Compass_SITL.cpp +++ b/libraries/AP_Compass/AP_Compass_SITL.cpp @@ -8,7 +8,6 @@ extern const AP_HAL::HAL& hal; AP_Compass_SITL::AP_Compass_SITL() : _sitl(AP::sitl()) - , _has_sample(false) { if (_sitl != nullptr) { _compass._setup_earth_field(); @@ -121,37 +120,14 @@ void AP_Compass_SITL::_timer() publish_raw_field(f, _compass_instance[i]); correct_field(f, _compass_instance[i]); - _mag_accum[i] += f; - } - - WITH_SEMAPHORE(_sem); - - _accum_count++; - if (_accum_count == 10) { - for (uint8_t i=0; i buffer; void _timer(); - bool _has_sample; uint32_t _last_sample_time; - Vector3f _mag_accum[SITL_NUM_COMPASSES]; - uint32_t _accum_count; - void _setup_eliptical_correcion(); Matrix3f _eliptical_corr;