Browse Source

events: tempcal: run cal for all available gyros

sbg
Siddharth Bharat Purohit 8 years ago committed by Lorenz Meier
parent
commit
5c7dbe0f24
  1. 6
      src/modules/events/temperature_calibration.cpp

6
src/modules/events/temperature_calibration.cpp

@ -213,7 +213,7 @@ void Tempcal::task_main()
} }
//l++; //l++;
for (unsigned i = 0; i < 1; i++) { for (unsigned i = 0; i < num_gyro; i++) {
if (_hot_soaked[i]) { if (_hot_soaked[i]) {
continue; continue;
} }
@ -250,7 +250,7 @@ void Tempcal::task_main()
num_samples[i] = 0; num_samples[i] = 0;
} }
for (unsigned i = 0; i < 1; i++) { for (unsigned i = 0; i < num_gyro; i++) {
if (_hot_soaked[i] && !_tempcal_complete[i]) { if (_hot_soaked[i] && !_tempcal_complete[i]) {
double res[3][4] = {0.0f}; double res[3][4] = {0.0f};
P[i][0].fit(res[0]); P[i][0].fit(res[0]);
@ -279,7 +279,7 @@ void Tempcal::task_main()
} }
for (unsigned j = 0; j < 3; j++) { for (unsigned j = 0; j < 3; j++) {
for (unsigned m = 0; m < 3; m++) { for (unsigned m = 0; m <= 3; m++) {
sprintf(str, "TC_G%d_X%d_%d", i, m, j); sprintf(str, "TC_G%d_X%d_%d", i, m, j);
param = (float)res[j][m]; param = (float)res[j][m];
result = param_set(param_find(str), &param); result = param_set(param_find(str), &param);

Loading…
Cancel
Save