1234567891011121314151617181920212223242526272829303132333435 |
- /**
- * @brief 线性插值计算电容值对应的油水比例(%)
- * @param cap 输入的电容值(单位:pF)
- * @return 油水比例百分比(范围:0.0f ~ 100.0f)
- */
- #ifndef __CALIB_PIECEWISE_LINEAR_H
- #define __CALIB_PIECEWISE_LINEAR_H
- #include <stdint.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- typedef enum {
- OIL_DIESEL, // 柴油
- OIL_92, // 92# 汽油
- OIL_95, // 95# 汽油
- OIL_98 // 98# 汽油
- } OilType;
- extern OilType g_oil_type;
- void Load_Default_CalibPoints(void);
- float Estimate_Percentage_piecewise(float cap);
- #ifdef __cplusplus
- }
- #endif
- #endif // __CALIB_PIECEWISE_LINEAR_H
|