diff --git a/include/dsp.h b/include/dsp.h index d943fc581b..763a7777f4 100644 --- a/include/dsp.h +++ b/include/dsp.h @@ -237,7 +237,6 @@ struct svm3_state_f32_s struct openloop_data_f32_s { - float max; /* Open-loop max speed */ float angle; /* Open-loop current angle normalized to <0.0, 2PI> */ float per; /* Open-loop control execution period */ }; @@ -445,8 +444,7 @@ void motor_sobserver_div(FAR struct motor_observer_f32_s *o, /* Motor openloop control */ -void motor_openloop_init(FAR struct openloop_data_f32_s *op, - float max, float per); +void motor_openloop_init(FAR struct openloop_data_f32_s *op, float per); void motor_openloop(FAR struct openloop_data_f32_s *op, float speed, float dir); float motor_openloop_angle_get(FAR struct openloop_data_f32_s *op); diff --git a/libs/libdsp/lib_motor.c b/libs/libdsp/lib_motor.c index 63cbe0071e..d691d19843 100644 --- a/libs/libdsp/lib_motor.c +++ b/libs/libdsp/lib_motor.c @@ -42,7 +42,6 @@ * * Input Parameters: * op - (in/out) pointer to the openloop data structure - * max - (in) maximum openloop speed * per - (in) period of the open-loop control * * Returned Value: @@ -50,11 +49,9 @@ * ****************************************************************************/ -void motor_openloop_init(FAR struct openloop_data_f32_s *op, float max, - float per) +void motor_openloop_init(FAR struct openloop_data_f32_s *op, float per) { LIBDSP_DEBUGASSERT(op != NULL); - LIBDSP_DEBUGASSERT(max > 0.0f); LIBDSP_DEBUGASSERT(per > 0.0f); /* Reset openloop structure */ @@ -63,7 +60,6 @@ void motor_openloop_init(FAR struct openloop_data_f32_s *op, float max, /* Initialize data */ - op->max = max; op->per = per; } @@ -92,15 +88,6 @@ void motor_openloop(FAR struct openloop_data_f32_s *op, float speed, float phase_step = 0.0f; - /* REVISIT: what should we do if speed is greater than max open-loop speed? - * Saturate speed or stop motor ? - */ - - if (speed > op->max) - { - speed = op->max; - } - /* Get phase step */ phase_step = dir * speed * op->per;