```
feat(DengFOC): 新增了基于三相电流采样的dq轴电流计算函数`cal_Iq_Id` 调整了开环控制中的电压限制逻辑 更新了默认电源电压值为24V。 KHT7823测试代码 ```
This commit is contained in:
+10
-10
@@ -6,29 +6,29 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "stdint.h"
|
||||
|
||||
constexpr u8 FILTER_SIZE = 6;
|
||||
class sampler {
|
||||
private:
|
||||
float vbus_samples[7];
|
||||
float currU_samples[7];
|
||||
float currV_samples[7];
|
||||
float currW_samples[7];
|
||||
float mcu_temp_samples[7];
|
||||
float drv_temp_samples[7];
|
||||
private:
|
||||
float vbus_samples[FILTER_SIZE + 1];
|
||||
float currU_samples[FILTER_SIZE + 1];
|
||||
float currV_samples[FILTER_SIZE + 1];
|
||||
float currW_samples[FILTER_SIZE + 1];
|
||||
float mcu_temp_samples[FILTER_SIZE + 1];
|
||||
float drv_temp_samples[FILTER_SIZE + 1];
|
||||
|
||||
float tempora_sample;
|
||||
|
||||
public:
|
||||
void init();
|
||||
void update_mcu_temp(void);
|
||||
void update_drv_temp(void);
|
||||
void update_vbus_voltage(void);
|
||||
void update_current(void);
|
||||
|
||||
|
||||
float get_mcu_temp(void);
|
||||
float get_drv_temp(void);
|
||||
float get_vbus_voltage(void);
|
||||
float get_current(char);
|
||||
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user