1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +03:00

time filter execution

This commit is contained in:
Joel Fuster 2015-01-03 13:10:05 -05:00
parent 654c614380
commit d019fa181d

View file

@ -44,11 +44,15 @@
#include "lowpass_table.h"
#define GIMBAL_SERVO_PITCH 0
#define GIMBAL_SERVO_ROLL 1
#define AUX_FORWARD_CHANNEL_TO_SERVO_COUNT 4
#include "drivers/system.h"
extern int16_t debug[4];
static uint8_t motorCount = 0;
int16_t motor[MAX_SUPPORTED_MOTORS];
int16_t motor_disarmed[MAX_SUPPORTED_MOTORS];
@ -708,6 +712,8 @@ void filterServos(void)
{
int16_t servoIdx;
uint32_t startTime = micros();
if (mixerConfig->servo_lowpass_enable) {
for (servoIdx = 0; servoIdx < MAX_SUPPORTED_SERVOS; servoIdx++) {
// Round to nearest
@ -716,5 +722,7 @@ void filterServos(void)
servo[servoIdx] = constrain(servo[servoIdx], servoConf[servoIdx].min, servoConf[servoIdx].max);
}
}
debug[0] = (int16_t)(micros() - startTime);
}