diff --git a/industry/foc/fixed16/foc_ang_openloop.c b/industry/foc/fixed16/foc_ang_openloop.c index 64f8194b8..8744f2da5 100644 --- a/industry/foc/fixed16/foc_ang_openloop.c +++ b/industry/foc/fixed16/foc_ang_openloop.c @@ -258,9 +258,11 @@ static int foc_angle_ol_run_b16(FAR foc_angle_b16_t *h, DEBUGASSERT(h->data); ol = h->data; - /* Update open-loop */ + /* Update open-loop. + * NOTE: we don't use dir argument here, instead we use signed velocity. + */ - motor_openloop_b16(&ol->data, in->vel, in->dir); + motor_openloop_b16(&ol->data, in->vel, 1); tmp = motor_openloop_angle_get_b16(&ol->data); diff --git a/industry/foc/float/foc_ang_openloop.c b/industry/foc/float/foc_ang_openloop.c index 44122025a..d33f30169 100644 --- a/industry/foc/float/foc_ang_openloop.c +++ b/industry/foc/float/foc_ang_openloop.c @@ -259,9 +259,11 @@ static int foc_angle_ol_run_f32(FAR foc_angle_f32_t *h, DEBUGASSERT(h->data); ol = h->data; - /* Update open-loop */ + /* Update open-loop. + * NOTE: we don't use dir argument here, instead we use signed velocity. + */ - motor_openloop(&ol->data, in->vel, in->dir); + motor_openloop(&ol->data, in->vel, 1.0f); /* Get open-loop angle */