@@ -107,3 +107,49 @@ void IMU::getAhrsData(float *pitch, float *roll, float *yaw) {
107107 MahonyAHRSupdateIMU (gyroX * DEG_TO_RAD, gyroY * DEG_TO_RAD,
108108 gyroZ * DEG_TO_RAD, accX, accY, accZ, pitch, roll, yaw);
109109}
110+
111+ void IMU::setFIFOEnable (bool enable_flag) {
112+ if (imuType == IMU_SH200Q) {
113+ Serial.println (" IMU_SH200Q: setFIFOEnable() not implemented" );
114+ } else if (imuType == IMU_MPU6886) {
115+ M5.Mpu6886 .setFIFOEnable (enable_flag);
116+ }
117+ }
118+
119+ uint8_t IMU::ReadFIFO () {
120+ uint8_t read_fifo = 0 ;
121+
122+ if (imuType == IMU_SH200Q) {
123+ Serial.println (" IMU_SH200Q: ReadFIFO() not implemented" );
124+ } else if (imuType == IMU_MPU6886) {
125+ read_fifo = M5.Mpu6886 .ReadFIFO ();
126+ }
127+ return read_fifo;
128+ }
129+
130+ void IMU::ReadFIFOBuff (uint8_t *data_buf, uint16_t length) {
131+ if (imuType == IMU_SH200Q) {
132+ Serial.println (" IMU_SH200Q: ReadFIFOBuff() not implemented" );
133+ } else if (imuType == IMU_MPU6886) {
134+ M5.Mpu6886 .ReadFIFOBuff (data_buf, length);
135+ }
136+ }
137+
138+ uint16_t IMU::ReadFIFOCount () {
139+ uint16_t fifo_count = 0 ;
140+
141+ if (imuType == IMU_SH200Q) {
142+ Serial.println (" IMU_SH200Q: ReadFIFOCount() not implemented" );
143+ } else if (imuType == IMU_MPU6886) {
144+ fifo_count = M5.Mpu6886 .ReadFIFOCount ();
145+ }
146+ return fifo_count;
147+ }
148+
149+ void IMU::RestFIFO () {
150+ if (imuType == IMU_SH200Q) {
151+ Serial.println (" IMU_SH200Q: RestFIFO() not implemented" );
152+ } else if (imuType == IMU_MPU6886) {
153+ M5.Mpu6886 .RestFIFO ();
154+ }
155+ }
0 commit comments