Skip to content
Snippets Groups Projects
Commit 4a199c13 authored by Beat Küng's avatar Beat Küng
Browse files

gyro calibration: avoid double initialization of gyro_scale data

They're initialized in do_gyro_calibration already
parent f1b8bed5
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,6 @@ static calibrate_return gyro_calibration_worker(int cancel_sub, void* data)
}
memset(&worker_data->gyro_report_0, 0, sizeof(worker_data->gyro_report_0));
memset(&worker_data->gyro_scale, 0, sizeof(worker_data->gyro_scale));
/* use first gyro to pace, but count correctly per-gyro for statistics */
while (calibration_counter[0] < calibration_count) {
......@@ -142,9 +141,6 @@ static calibrate_return gyro_calibration_worker(int cancel_sub, void* data)
return calibrate_return_error;
}
worker_data->gyro_scale[s].x_scale = 1.0f;
worker_data->gyro_scale[s].y_scale = 1.0f;
worker_data->gyro_scale[s].z_scale = 1.0f;
worker_data->gyro_scale[s].x_offset /= calibration_counter[s];
worker_data->gyro_scale[s].y_offset /= calibration_counter[s];
worker_data->gyro_scale[s].z_offset /= calibration_counter[s];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment