|
|
@@ -6,6 +6,7 @@
|
|
|
#include "os/os_task.h"
|
|
|
#include "foc/foc_config.h"
|
|
|
#include "bsp/delay.h"
|
|
|
+#include "libs/logger.h"
|
|
|
|
|
|
typedef struct {
|
|
|
float value;
|
|
|
@@ -96,10 +97,13 @@ void sample_uvw_phase(void) {
|
|
|
#ifdef U_VOL_ADC_CHAN
|
|
|
u16 uvw[3];
|
|
|
adc_get_uvw_phaseV(uvw);
|
|
|
+
|
|
|
_uvw_phase[0].value = (float)uvw[0] * UVW_VOL_CEOF;
|
|
|
LowPass_Filter(_uvw_phase[0].filted_value, _uvw_phase[0].value, _uvw_phase[0].lowpass);
|
|
|
+
|
|
|
_uvw_phase[1].value = (float)uvw[1] * UVW_VOL_CEOF;
|
|
|
LowPass_Filter(_uvw_phase[1].filted_value, _uvw_phase[1].value, _uvw_phase[1].lowpass);
|
|
|
+
|
|
|
_uvw_phase[2].value = (float)uvw[2] * UVW_VOL_CEOF;
|
|
|
LowPass_Filter(_uvw_phase[2].filted_value, _uvw_phase[2].value, _uvw_phase[2].lowpass);
|
|
|
|