📄 stdafx.h
字号:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#pragma once
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#endif
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
#endif
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
// turns off MFC's hiding of some common and often safely ignored warning messages
#define _AFX_ALL_WARNINGS
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
struct CCPidStruct
{//608 字节
short int kp[32]; //比例 放大1000倍
short int ki[32]; //积分 放大100倍
short int kd[32]; //微分 放大1倍
short int bias[32]; //静态输出 放大1倍
short int accel[32]; //加速速率 放大10倍
short int integral[32]; //开始调节 放大10倍
short int scale[32]; //采样斜率 放大1000倍
short int zero[32]; //采样零点 放大10倍
short int m_current[32]; //最大电流百分比 放大10倍
BOOL self_sel[32];
};
struct In
{
long min;
long max;
};
struct Out
{
long min;
long max;
};
struct Rule
{
int antecedent[8];
int consequent[8];
};
struct pid_struct
{
long e[3];
long E1;
long E2;
long E3;
long prev_Un;
long this_Un;
long this_Output;
long dUn;
long U0;
long first;
long integral;
long test_kd;
};
struct MyFuzzy
{
long fuzzy_inputs[8][8];
long fuzzy_outputs[4][8];
long fuzzy_outputs_image[4][8];
long rule_strengths[64];
long crisp_inputs[2]; //
long crisp_outputs[3];//ΔKp,ΔKI,ΔKD 当前输出
long crisp_scale[3]; // Kp, KI, KD 当前输出
};
#endif // _AFX_NO_AFXCMN_SUPPORT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -