diff --git a/UAV-ControlSystem/src/drivers/accel_gyro.c b/UAV-ControlSystem/src/drivers/accel_gyro.c index dae9b97..bc019df 100644 --- a/UAV-ControlSystem/src/drivers/accel_gyro.c +++ b/UAV-ControlSystem/src/drivers/accel_gyro.c @@ -246,6 +246,8 @@ bool mpu6000_init(gyro_t* gyro, accel_t* accel) HAL_Delay(60); + accel->pitchAngle = 0; + accel->rollAngle = 0; return true; } diff --git a/UAV-ControlSystem/src/drivers/motors.c b/UAV-ControlSystem/src/drivers/motors.c index 53bb569..1a44d5c 100644 --- a/UAV-ControlSystem/src/drivers/motors.c +++ b/UAV-ControlSystem/src/drivers/motors.c @@ -14,6 +14,7 @@ #include "drivers/motors.h" #include "drivers/failsafe_toggles.h" #include "config/eeprom.h" +#include "drivers/motormix.h" const int MotorPWMPeriode = 2000; //Micro seconds const int MotorPWMInitPulse = 1000; @@ -162,7 +163,11 @@ void pwmEnableMotor(uint8_t motor, motorOutput motorOutput) **************************************************************************/ void pwmEnableAllMotors(motorOutput motorOutput) { - for (uint8_t i = 1; i < 11; i++ ) pwmEnableMotor(i, motorOutput); + for (uint8_t i = 1; i < 11; i++ ) + { + pwmEnableMotor(i, motorOutput); + pwmAdjustSpeedOfMotor(i,mixerConfig.minCommand); + } } /**************************************************************************