Полный переход на C++

*Чтение IMU и обработка его данных выполняется в точности как в рабочей прошивке.
*Определение вращения работает корректно.
This commit is contained in:
2026-04-17 13:40:27 +03:00
parent a3d845df9e
commit 0faafbf089
21 changed files with 247 additions and 1210 deletions

28
Source/Control/PID.h Normal file
View File

@@ -0,0 +1,28 @@
#pragma once
#ifndef PID_H
#define PID_H
#include "stm32g4xx.h"
struct pid_t
{
float kp;
float ki;
float kd;
float integral;
float prev_error;
};
struct control_channels_t
{
float roll;
float pitch;
float yaw;
};
float pid_update(pid_t* pid, float error, float gyro_rate, float dt);
#endif