diff --git a/lib/Espfc/src/Blackbox.h b/lib/Espfc/src/Blackbox.h index fe8c0773..1cb3e1c0 100644 --- a/lib/Espfc/src/Blackbox.h +++ b/lib/Espfc/src/Blackbox.h @@ -266,7 +266,7 @@ class Blackbox if(_model.magActive()) enabledSensors |= SENSOR_MAG; if(_model.baroActive()) enabledSensors |= SENSOR_BARO; - gyro.sampleLooptime = 125; //_model.state.gyroTimer.interval; + gyro.sampleLooptime = _model.state.gyroTimer.interval; targetPidLooptime = _model.state.loopTimer.interval; activePidLoopDenom = _model.config.loopSync; diff --git a/lib/Espfc/src/Sensor/GyroSensor.h b/lib/Espfc/src/Sensor/GyroSensor.h index 5ff94f5c..48c3df53 100644 --- a/lib/Espfc/src/Sensor/GyroSensor.h +++ b/lib/Espfc/src/Sensor/GyroSensor.h @@ -189,7 +189,7 @@ class GyroSensor: public BaseSensor _model.state.debug[0] = lrintf(_fft[i].peaks[0].freq); _model.state.debug[1] = lrintf(_fft[i].peaks[1].freq); _model.state.debug[2] = lrintf(_fft[i].peaks[2].freq); - _model.state.debug[3] = lrintf(degrees(_model.state.gyro[i])); + _model.state.debug[3] = lrintf(_fft[i].peaks[3].freq); } } if(dynamicFilterEnabled && dynamicFilterUpdate) @@ -216,7 +216,7 @@ class GyroSensor: public BaseSensor if(dynamicFilterDebug) { _model.state.debug[i] = lrintf(freq); - if(i == _model.config.debugAxis) _model.state.debug[3] = lrintf(degrees(_model.state.gyro[i])); + if(i == _model.config.debugAxis) _model.state.debug[3] = lrintf(degrees(_model.state.gyroDynNotch[i])); } if(dynamicFilterEnabled && dynamicFilterUpdate) {