39 #include "lib/sensors.h"
43 static uint8_t initialized = 0;
44 static uint8_t ready = 0;
45 #define raw_to_dps(raw) TODO
49 cond_update_gyro_data(
int ch)
53 static uint8_t gyro_data_obsolete_vec = 0xFF;
57 if (gyro_data_obsolete_vec & (1 << ch)) {
59 gyro_data_obsolete_vec = 0x00;
62 gyro_data_obsolete_vec |= (1 << ch);
70 cond_update_gyro_data(GYRO_X);
74 cond_update_gyro_data(GYRO_Y);
78 cond_update_gyro_data(GYRO_Z);
82 cond_update_gyro_data(GYRO_X_RAW);
86 cond_update_gyro_data(GYRO_Y_RAW);
90 cond_update_gyro_data(GYRO_Z_RAW);
144 value = L3G4200D_250DPS;
147 value = L3G4200D_500DPS;
150 value = L3G4200D_2000DPS;
159 if (c <= GYRO_100HZ) {
161 }
else if (c <= GYRO_200HZ) {
163 }
else if (c <= GYRO_400HZ) {
165 }
else if (c <= GYRO_800HZ) {