Преглед на файлове

修改扭矩

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui преди 3 години
родител
ревизия
a1a0feeba8
променени са 2 файла, в които са добавени 6 реда и са изтрити 7 реда
  1. 2 2
      Applications/app/app.c
  2. 4 5
      Applications/foc/core/thro_torque.c

+ 2 - 2
Applications/app/app.c

@@ -155,8 +155,8 @@ static void plot_smo_angle(void) {
 }
 static u32 _app_plot_task(void * args) {
 	if (plot_type == 1) {
-		//can_plot2((s16)(PMSM_FOC_Get()->in.s_targetTorque*1000.0f), (s16)PMSM_FOC_GetSpeed());
-		can_plot3((s16)PMSM_FOC_Get()->vel_lim_adrc.z1, (s16)PMSM_FOC_Get()->vel_lim_adrc.z2, (s16)PMSM_FOC_GetSpeed());
+		can_plot2((s16)(PMSM_FOC_Get()->in.s_targetTorque*10.0f), (s16)PMSM_FOC_GetSpeed());
+		//can_plot3((s16)PMSM_FOC_Get()->vel_lim_adrc.z1, (s16)PMSM_FOC_Get()->vel_lim_adrc.z2, (s16)PMSM_FOC_GetSpeed());
 		//can_plot2(test_id, test_iq);
 	}else if (plot_type == 2) {
 		can_plot2(eCtrl_get_RefTorque(), eCtrl_get_FinalTorque());

+ 4 - 5
Applications/foc/core/thro_torque.c

@@ -9,7 +9,6 @@
 #include "prot/can_foc_msg.h"
 
 static thro_torque_t _torque;
-
 static motor_map_t gear_torques[4][5] = {
 #if 0
 	[0] = {{500,  10}, {1200, 10}, {1700, 10}, {2200, 10}, {8000, 10},},
@@ -17,10 +16,10 @@ static motor_map_t gear_torques[4][5] = {
 	[2] = {{1200, 10}, {2200, 10}, {3200, 10}, {4200, 10}, {8000, 10},},
 	[3] = {{3000, 10}, {4740, 10}, {5050, 11}, {5200, 10}, {8000, 10},},
 #else
-	[0] = {{500,  100}, {1200, 100}, {1700, 100}, {2200, 100}, {8000, 100},},
-	[1] = {{800,  100}, {1600, 100}, {2400, 100}, {3200, 100}, {8000, 100},},
-	[2] = {{1200, 100}, {2200, 100}, {3200, 100}, {4200, 100}, {8000, 100},},
-	[3] = {{3000, 100}, {4740, 100}, {5050, 100}, {5200, 100}, {8000, 100},},
+	[0] = {{3000,  400}, {5000, 246}, {6000, 220}, {7000, 208}, {8000, 193},},
+	[1] = {{3000,  400}, {5000, 246}, {6000, 220}, {7000, 208}, {8000, 193},},
+	[2] = {{3000,  400}, {5000, 246}, {6000, 220}, {7000, 208}, {8000, 193},},
+	[3] = {{3000,  400}, {5000, 246}, {6000, 220}, {7000, 208}, {8000, 193},},
 #endif
 };