|
|
@@ -137,9 +137,9 @@ static void plot_smo_angle(void) {
|
|
|
}
|
|
|
static u32 _app_plot_task(void * args) {
|
|
|
if (plot_type == 1) {
|
|
|
- can_plot2((s16)foc_observer_sensorless_speed(), (s16)mot_contrl_get_speed(mot_contrl()));
|
|
|
+ can_plot2((s16)foc_observer_sensorless_speed(), (s16)mot_contrl_get_speed(&motor.controller));
|
|
|
}else if (plot_type == 2) {
|
|
|
- can_plot2(mot_contrl_get_final_torque(mot_contrl()), mot_contrl()->target_torque);
|
|
|
+ can_plot2(mot_contrl_get_final_torque(&motor.controller), mot_contrl()->target_torque);
|
|
|
}else if (plot_type == 3) {
|
|
|
plot_smo_angle();
|
|
|
}else if (plot_type == 4) {
|
|
|
@@ -149,13 +149,9 @@ static u32 _app_plot_task(void * args) {
|
|
|
}else if (plot_type == 6) {
|
|
|
//do it in other place
|
|
|
}else if (plot_type == 7) {
|
|
|
- #ifdef CONFIG_DQ_STEP_RESPONSE
|
|
|
- can_plot2((s16)(target_d*10.0f), (s16)(motor.controller.foc.out.curr_dq.d * 10.0f));
|
|
|
- #endif
|
|
|
+ can_plot2((s16)(foc()->in.target_id.target*10.0f), (s16)(foc()->out.curr_dq.d * 10.0f));
|
|
|
}else if (plot_type == 8) {
|
|
|
- #ifdef CONFIG_DQ_STEP_RESPONSE
|
|
|
- can_plot2((s16)(target_q*10.0f), (s16)(motor.controller.foc.out.curr_dq.q * 10.0f));
|
|
|
- #endif
|
|
|
+ can_plot2((s16)(foc()->in.target_iq.target*10.0f), (s16)(foc()->out.curr_dq.q * 10.0f));
|
|
|
}else if (plot_type == 9) {
|
|
|
s16 thro_v = get_throttle_float() * 100.0f;
|
|
|
s16 thro2_v = get_throttle2_float() * 100.0f;
|