1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00

If Gyro errors > 100 we stop spending time with I2C

This commit is contained in:
Bertrand Songis 2019-05-10 15:33:03 +02:00
parent 0af764bfab
commit bff7d5e0bd
2 changed files with 10 additions and 5 deletions

View file

@ -36,12 +36,13 @@ class GyroBuffer {
uint8_t index;
public:
void read(int32_t values[GYRO_VALUES_COUNT]);
int read(int32_t values[GYRO_VALUES_COUNT]);
};
class Gyro {
protected:
GyroBuffer gyroBuffer;
uint8_t errors = 0;
public:
int16_t outputs[2];