Software bug in MCSDK software MCI_SetCurrentReferences
I noticed the following bug in the MCSDK generated software, please confirm if it is correct
__weak void MCI_SetCurrentReferences(MCI_Handle_t *pHandle, qd_t Iqdref)
{
pHandle->Iqdref.q = Iqdref.q;
pHandle->Iqdref.d = Iqdref.d;
}
but it shall be
pHandle->pFOCVars->Iqdref.q = Iqdref.q;
pHandle->pFOCVars->Iqdref.d = Iqdref.d;
since it is used in
inline uint16_t FOC_CurrControllerM1(void)
{
Vqd.q = PI_Controller(pPIDIq[M1], (int32_t)(FOCVars[M1].Iqdref.q) - Iqd.q);
Vqd.d = PI_Controller(pPIDId[M1], (int32_t)(FOCVars[M1].Iqdref.d) - Iqd.d);
}
Is my understanding correct?
