This commit is contained in:
2025-05-21 16:24:36 +02:00
parent 2440990a6e
commit 66a25a0606
8 changed files with 17 additions and 2 deletions

View File

@@ -321,8 +321,6 @@ void IMUinit();
void getIMUdata();
void calculate_IMU_error();
void calibrateAttitude();
void Madgwick(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz, float invSampleFreq);
void Madgwick6DOF(float gx, float gy, float gz, float ax, float ay, float az, float invSampleFreq);
void getDesState();
void controlANGLE();
void controlANGLE2();
@@ -1429,6 +1427,8 @@ void commandMotors() {
uint32_t m5_duty = map(m5_command_PWM, 125, 250, 1100, 2000);
uint32_t m6_duty = map(m6_command_PWM, 125, 250, 1100, 2000);
//may need to add pulsewidth to duty cycle conversion
// Write the duty cycle values directly to each pin
ledcWrite(m1Pin, m1_duty);
ledcWrite(m2Pin, m2_duty);