You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/08/20 12:53:50 UTC
[GitHub] [incubator-nuttx-apps] pkarashchenko commented on a diff in pull request #1287: industry/foc foc_ident: improve flux linkage identification method
pkarashchenko commented on code in PR #1287:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1287#discussion_r950692495
##########
industry/foc/float/foc_ident.c:
##########
@@ -650,12 +653,23 @@ int foc_routine_ident_run_f32(FAR foc_routine_f32_t *r,
break;
}
- case FOC_IDENT_RUN_IDLE1:
- case FOC_IDENT_RUN_IDLE2:
case FOC_IDENT_RUN_IDLE3:
#ifdef CONFIG_INDUSTRY_FOC_IDENT_FLUX
+ if (i->cntr == 0)
+ {
+ ret = i->cfg.cb.kpki(i->cfg.cb.priv_kpki, i->final.res,
+ i->final.ind, i->cfg.per);
+ if (ret < 0)
+ {
+ FOCLIBERR("ERROR: ident kpki callback failed %d!\n", ret);
+ goto errout;
Review Comment:
nitpick: in most of the cases when `goto errout;` is used the simple `break;` should be enough
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org