Add FOC_Current timer

This commit is contained in:
Unknown
2020-08-27 18:09:44 -04:00
parent c834533be6
commit ea03574ce3
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -48,6 +48,7 @@ public:
TaskTimer total;
TaskTimer uart_poll;
TaskTimer FOC_Current;
};
static LockinConfig_t default_calibration();
+2
View File
@@ -292,6 +292,7 @@ bool Motor::FOC_voltage(float v_d, float v_q, float pwm_phase) {
}
bool Motor::FOC_current(float Id_des, float Iq_des, float I_phase, float pwm_phase, float phase_vel) {
axis_->task_times_.FOC_Current.beginTimer();
// Syntactic sugar
CurrentControl_t& ictrl = current_control_;
@@ -404,6 +405,7 @@ bool Motor::FOC_current(float Id_des, float Iq_des, float I_phase, float pwm_pha
}
}
axis_->task_times_.FOC_Current.stopTimer();
return true;
}
+1
View File
@@ -479,6 +479,7 @@ interfaces:
brake_update: TaskTimer
adc_cb: TaskTimer
total: TaskTimer
FOC_Current: TaskTimer
ODrive.TaskTimer:
c_is_class: False