This commit is contained in:
2026-03-20 21:16:58 +08:00
parent 286ff98b8e
commit 90c3d919df
248 changed files with 94554 additions and 0 deletions

40
user/Compute/AdjustOffset.h Executable file
View File

@@ -0,0 +1,40 @@
/********************************************************************************************************
**-------------------------------------------------------------------------------------------------------
********************************************************************************************************/
#ifndef __AdjustOffset_h__
#define __AdjustOffset_h__
//******************************************************************************
// parameter limit
#define ATYPE_WIPER_MIN 0
#define ATYPE_WIPER_MAX POT_MAX
#define ATYPE_WIPER_DEFAULT POT_DEFAULT
#define CTYPE_WIPER_MIN 0
#define CTYPE_WIPER_MAX POT_MAX
#define CTYPE_WIPER_DEFAULT POT_DEFAULT
#define ATYPE_RC_MIN 0
#define ATYPE_RC_MAX 1000
#define ATYPE_RC_DEFAULT 430
#define ATYPE_RA 5100 //(5100-510.0)
#define ATYPE_RB VHH_R56
#define ATYPE_ADJUST_RES 1000 //(100.0)
#define ATYPE_PER_POT (float)((float)ATYPE_ADJUST_RES/(float)256)
//******************************************************************************
extern u16 ATypeWiper, CTypeWiper, MaxCTypeWiper, MinCTypeWiper, ATypeRC, actualRC, RRRHRatio;
extern u16 OffsetHigh, OffsetLow, MEMSRatio;
//------------------------------------------------------------------------------
void ComputRRRHRatio(void);
void AdjustOffsetInit(void);
signed int ComputeOffsetDrift(void);
signed int ComputeOffsetCorrectValue(unsigned int offsetHigh, unsigned int offsetLow);
void ComputeOffsetDriftInit(void);
void AutoAdjustCTypeWiper(void);
void AutoComputeATypeRC(void);
//******************************************************************************
#endif
//******************************************************************************