Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions emachinery/frameworkCodes/c/main_switch.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
#define MODE_SELECT_GENERATOR 8
#define MODE_SELECT_NB_MODE 99

typedef struct {
// 前向定义解决gcc的-Wincompatible-pointer-types问题
typedef struct st_pid_regulator st_pid_regulator;

struct st_pid_regulator {
float32 Ref;
float32 Fbk;
float32 Err;
Expand All @@ -60,8 +63,8 @@ typedef struct {
float32 Kd;
float32 SatDiff;
float32 FbkPrev;
void (*calc)();
} st_pid_regulator;
void (*calc)(st_pid_regulator *);
};
typedef st_pid_regulator *st_pid_regulator_handle;

// void ACMSIMC_PIDTuner();
Expand All @@ -85,7 +88,7 @@ void tustin_PI(st_pid_regulator *r);
/*Kd*/ 0.0, \
/*Difference between Non-Saturated Output and Saturated Output*/ 0.0, \
/*Previous Feedback*/ 0.0, \
(void (*)(Uint32)) incremental_PI \
(void (*)(st_pid_regulator *)) incremental_PI \
}
// (void (*)(Uint32)) tustin_PI \

Expand Down