industry/foc: reset align data when align is finished
this allows the align procedure to be run multiple times
This commit is contained in:
parent
8ee684e586
commit
5a65f3d48f
@ -1005,5 +1005,12 @@ int foc_routine_align_final_b16(FAR foc_routine_b16_t *r, FAR void *data)
|
|||||||
|
|
||||||
memcpy(data, &a->final, sizeof(struct foc_routine_aling_final_b16_s));
|
memcpy(data, &a->final, sizeof(struct foc_routine_aling_final_b16_s));
|
||||||
|
|
||||||
|
/* Reset data but leave configuration */
|
||||||
|
|
||||||
|
memset(&a->final,
|
||||||
|
0,
|
||||||
|
(sizeof(struct foc_align_b16_s) -
|
||||||
|
sizeof(struct foc_routine_align_cfg_b16_s)));
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
@ -1005,5 +1005,12 @@ int foc_routine_align_final_f32(FAR foc_routine_f32_t *r, FAR void *data)
|
|||||||
|
|
||||||
memcpy(data, &a->final, sizeof(struct foc_routine_aling_final_f32_s));
|
memcpy(data, &a->final, sizeof(struct foc_routine_aling_final_f32_s));
|
||||||
|
|
||||||
|
/* Reset data but leave configuration */
|
||||||
|
|
||||||
|
memset(&a->final,
|
||||||
|
0,
|
||||||
|
(sizeof(struct foc_align_f32_s) -
|
||||||
|
sizeof(struct foc_routine_align_cfg_f32_s)));
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user