removed print statments
This commit is contained in:
parent
0c5fcf85ac
commit
c389c998dd
|
@ -331,10 +331,6 @@ self_test_results gy521_self_test(struct gy521_module* m)
|
|||
/*1. read the reg FT values*/
|
||||
/*2. calulate the FT using the formula from the datasheet*/
|
||||
struct ft_vals factory_trim = self_test_ft_calculation(m);
|
||||
printf("ft_vals: %.6f, %.6f, %.6f\n",
|
||||
factory_trim.x,
|
||||
factory_trim.y,
|
||||
factory_trim.z);
|
||||
|
||||
/*3. Read the STR data from the gyro*/
|
||||
gy521_update_gyro(m);
|
||||
|
@ -347,28 +343,22 @@ self_test_results gy521_self_test(struct gy521_module* m)
|
|||
gy521_update_gyro(m);
|
||||
|
||||
/*6. Finish the STR calculation*/
|
||||
printf("gy.x: %d, gy.y: %d, gy.z: %d\n", m->gyro.x, m->gyro.y, m->gyro.z);
|
||||
STR.x -= m->gyro.x;
|
||||
STR.y -= m->gyro.y;
|
||||
STR.z -= m->gyro.z;
|
||||
|
||||
printf("str.x: %d, str.y: %d, str.z: %d\n", STR.x, STR.y, STR.z);
|
||||
|
||||
/*7. Now we calculate the change from the FT of the STR*/
|
||||
float testing_value = ( ((float)STR.x) - factory_trim.x) / factory_trim.x;
|
||||
printf("valuex: %.6f\n", testing_value);
|
||||
if(testing_value > GYRO_MAX_ST || testing_value < GYRO_MIN_ST) {
|
||||
return gyro_failed;
|
||||
}
|
||||
|
||||
testing_value = ( ((float)STR.y) - factory_trim.y) / factory_trim.y;
|
||||
printf("valuey: %.6f\n", testing_value);
|
||||
if(testing_value > GYRO_MAX_ST || testing_value < GYRO_MIN_ST) {
|
||||
return gyro_failed;
|
||||
}
|
||||
|
||||
testing_value = ( ((float)STR.z) - factory_trim.z) / factory_trim.z;
|
||||
printf("valuez: %.6f\n", testing_value);
|
||||
if(testing_value > GYRO_MAX_ST || testing_value < GYRO_MIN_ST) {
|
||||
return gyro_failed;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue