examples/foc: add support for sensor index search

This commit is contained in:
raiden00pl 2021-11-06 18:59:15 +01:00 committed by Xiang Xiao
parent 54c0b9a9d8
commit 629e5a8e62
2 changed files with 2 additions and 0 deletions

View File

@ -88,6 +88,7 @@ static int foc_motor_align(FAR struct foc_motor_b16_s *motor, FAR bool *done)
in.foc_state = &motor->foc_state;
in.angle = motor->angle_now;
in.angle_m = motor->angle_m;
#ifdef CONFIG_EXAMPLES_FOC_HAVE_VEL
in.vel = motor->vel.now;
#endif

View File

@ -88,6 +88,7 @@ static int foc_motor_align(FAR struct foc_motor_f32_s *motor, FAR bool *done)
in.foc_state = &motor->foc_state;
in.angle = motor->angle_now;
in.angle_m = motor->angle_m;
#ifdef CONFIG_EXAMPLES_FOC_HAVE_VEL
in.vel = motor->vel.now;
#endif