Files
RaDrone/Source/Control/Inc/pid.h
Radzhab Bisultanov eecf8f2cc2 Initial commit
2026-02-17 19:10:09 +03:00

26 lines
319 B
C

#ifndef PID_H
#define PID_H
#include "stm32g431xx.h"
typedef struct
{
float kp;
float ki;
float kd;
float integral;
float prev_error;
} pid_t;
typedef struct
{
float roll;
float pitch;
float yaw;
} control_channels_t;
float pid_update(pid_t* pid, float error, float gyro_rate, float dt);
#endif