Browse Source

高边电流采集修改为在中心点位置

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 3 years ago
parent
commit
e8a531db72
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Applications/foc/motor/current.c

+ 1 - 1
Applications/foc/motor/current.c

@@ -353,7 +353,7 @@ void phase_current_point(void *p){
 	cs->c_ignore_phase = IGNORE_NONE;
 	cs->c_ignore_phase = IGNORE_NONE;
 #ifdef HIGH_SIDE_CURRENT_SENSOR
 #ifdef HIGH_SIDE_CURRENT_SENSOR
 	cs->c_phases = PHASE_BC;
 	cs->c_phases = PHASE_BC;
-	out->n_Sample1 = FOC_PWM_Half_Period - TADC/2;
+	out->n_Sample1 = FOC_PWM_Half_Period - 1;
 #else
 #else
 	u16 *duty = out->n_Duty;
 	u16 *duty = out->n_Duty;
 	u16 max_hi_side = MAX(duty[0], MAX(duty[1], duty[2]));
 	u16 max_hi_side = MAX(duty[0], MAX(duty[1], duty[2]));