mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
Added debug IMU speed output
This commit is contained in:
parent
242409a443
commit
57fc0f0a57
2 changed files with 48 additions and 1 deletions
|
@ -19,11 +19,13 @@
|
|||
#include <stdint.h>
|
||||
|
||||
#include "platform.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include "common/axis.h"
|
||||
|
||||
#include "drivers/sensor.h"
|
||||
#include "drivers/accgyro.h"
|
||||
#include "drivers/system.h"
|
||||
|
||||
#include "sensors/battery.h"
|
||||
#include "sensors/sensors.h"
|
||||
|
@ -34,6 +36,8 @@
|
|||
|
||||
#include "sensors/acceleration.h"
|
||||
|
||||
#define DEBUG_IMU_SPEED
|
||||
|
||||
int16_t accADC[XYZ_AXIS_COUNT];
|
||||
|
||||
acc_t acc; // acc access functions
|
||||
|
@ -171,9 +175,15 @@ void applyAccelerationTrims(flightDynamicsTrims_t *accelerationTrims)
|
|||
|
||||
void updateAccelerationReadings(rollAndPitchTrims_t *rollAndPitchTrims)
|
||||
{
|
||||
#ifdef DEBUG_IMU_SPEED
|
||||
uint32_t time = micros();
|
||||
#endif
|
||||
if (!acc.read(accADC)) {
|
||||
return;
|
||||
}
|
||||
#ifdef DEBUG_IMU_SPEED
|
||||
debug[1] = micros() - time;
|
||||
#endif
|
||||
alignSensors(accADC, accADC, accAlign);
|
||||
|
||||
if (!isAccelerationCalibrationComplete()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue