before changing to soft iic

This commit is contained in:
2025-11-17 15:48:49 +08:00
parent 6de9d53e1c
commit 47e90abcb1
5 changed files with 3608 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
#ifndef CONFIG_H
#define CONFIG_H
#define DEBUG_ENABLED false
#define DEBUG_ENABLED true
#define DEBUG_MT_ENABLED false
#define DEBUG_DFOC_ENABLED false
#endif

View File

@@ -129,9 +129,9 @@ void Set_Angle(float Target)
{
printf("angle readback in dfoc.c is %f \n", langle);
}
volatile float Uq = PID_Controller(0.133, 0.01, 0, (Target - Dir * langle) * 180 / PI);
volatile float Uq = PID_Controller(0.067, 0.01, 0, (Target - Dir * langle) * 180 / PI);
//volatile float Uq = PID_Controller(0.06, 0, 0, (Target - Dir * langle) * 180 / PI);
if(DEBUG_ENABLED)
if(DEBUG_ENABLED& DEBUG_DFOC_ENABLED)
{
printf("Uq is %f \n", Uq);
}

View File

@@ -1,6 +1,6 @@
#include <stdint.h>
#include <ti_msp_dl_config.h>
#define limit 6.3
#define limit 5.0
#define Output_ramp 10000
//限幅