mirror of https://github.com/rusefi/bldc.git
limit mc_interface_set_current_off_delay time to 5s
This commit is contained in:
parent
bfe1fa0a12
commit
fdad367c8d
|
@ -1564,6 +1564,11 @@ void mc_interface_set_current_off_delay(float delay_sec) {
|
|||
return;
|
||||
}
|
||||
|
||||
UTILS_NAN_ZERO(delay_sec);
|
||||
if (delay_sec > 5.0) {
|
||||
delay_sec = 5.0;
|
||||
}
|
||||
|
||||
switch (motor_now()->m_conf.motor_type) {
|
||||
case MOTOR_TYPE_BLDC:
|
||||
case MOTOR_TYPE_DC:
|
||||
|
|
|
@ -2335,6 +2335,7 @@ void mcpwm_foc_print_state(void) {
|
|||
commands_printf("Obs_x2: %.2f", (double)motor_now()->m_observer_x2);
|
||||
commands_printf("vd_int: %.2f", (double)motor_now()->m_motor_state.vd_int);
|
||||
commands_printf("vq_int: %.2f", (double)motor_now()->m_motor_state.vq_int);
|
||||
commands_printf("off_delay: %.2f", (double)motor_now()->m_current_off_delay);
|
||||
}
|
||||
|
||||
float mcpwm_foc_get_last_adc_isr_duration(void) {
|
||||
|
|
Loading…
Reference in New Issue