void AP_AccelCal::start(GCS_MAVLINK *gcs) { if (gcs == nullptr || _started) { return; } _start_collect_sample = false; _num_active_calibrators = 0; AccelCalibrator *cal; for(uint8_t i=0; (cal = get_calibrator(i)); i++) { cal->clear(); cal->start(ACCEL_CAL_AXIS_ALIGNED_ELLIPSOID, 6, 0.5f); _num_active_calibrators++; } _started = true; _saving = false; _gcs = gcs; _use_gcs_snoop = true; _last_position_request_ms = 0; _step = 0; _last_result = ACCEL_CAL_NOT_STARTED; update_status(); }
void AP_AccelCal::clear() { if (!_started) { return; } AccelCalibrator *cal; for(uint8_t i=0 ; (cal = get_calibrator(i)) ; i++) { cal->clear(); } _step = 0; _started = false; _saving = false; update_status(); }
void AP_AccelCal::start(GCS_MAVLINK *gcs) { if (gcs == NULL || _started) { return; } _start_collect_sample = false; _num_active_calibrators = 0; AccelCalibrator *cal; for(uint8_t i=0; (cal = get_calibrator(i)); i++) { cal->clear(); cal->start(ACCEL_CAL_AXIS_ALIGNED_ELLIPSOID, 6, 0.5f); _num_active_calibrators++; } _started = true; _saving = false; _gcs = gcs; _step = 0; update_status(); }
void AP_AccelCal::clear() { if (!_started) { return; } for(uint8_t i=0 ; i < _num_clients ; i++) { _clients[i]->_acal_cancelled(); } AccelCalibrator *cal; for(uint8_t i=0 ; (cal = get_calibrator(i)) ; i++) { cal->clear(); } _gcs = NULL; _step = 0; _started = false; _saving = false; update_status(); }