diff --git a/include/dsp.h b/include/dsp.h index b249926d737..9e439715b39 100644 --- a/include/dsp.h +++ b/include/dsp.h @@ -324,9 +324,6 @@ struct motor_phy_params_f32_s float res; /* Phase-to-neutral temperature compensated * resistance */ - float res_base; /* Phase-to-neutral base resistance */ - float res_alpha; /* Temperature coefficient of resistance */ - float res_temp_ref; /* Reference temperature of alpha */ float ind; /* Average phase-to-neutral inductance */ float one_by_ind; /* Inverse phase-to-neutral inductance */ }; diff --git a/libs/libdsp/lib_motor.c b/libs/libdsp/lib_motor.c index 7c728305793..2db21788bca 100644 --- a/libs/libdsp/lib_motor.c +++ b/libs/libdsp/lib_motor.c @@ -365,38 +365,10 @@ void motor_phy_params_init(FAR struct motor_phy_params_f32_s *phy, { LIBDSP_DEBUGASSERT(phy != NULL); + memset(phy, 0, sizeof(struct motor_phy_params_f32_s)); + phy->p = poles; - phy->res_base = res; + phy->res = res; phy->ind = ind; - phy->one_by_ind = 1.0f / ind; - - /* Initialize with zeros */ - - phy->res = 0.0f; - phy->res_alpha = 0.0f; - phy->res_temp_ref = 0.0f; -} - -/**************************************************************************** - * Name: motor_phy_params_temp_set - * Description: - * Initialize motor physical temperature parameters - * - * Input Parameters: - * phy - (in/out) pointer to the motor physical parameters - * res_alpha - (in) temperature coefficient of the winding resistance - * res_temp_ref - (in) reference temperature for alpha - * - * Returned Value: - * None - * - ****************************************************************************/ - -void motor_phy_params_temp_set(FAR struct motor_phy_params_f32_s *phy, - float res_alpha, float res_temp_ref) -{ - LIBDSP_DEBUGASSERT(phy != NULL); - - phy->res_alpha = res_alpha; - phy->res_temp_ref = res_temp_ref; + phy->one_by_ind = (1.0f / ind); }