diff --git a/tasub.c b/tasub.c index 45992104..0d476173 100644 --- a/tasub.c +++ b/tasub.c @@ -370,14 +370,14 @@ int TasUBFactory(SConnection * pCon, SicsInterp * pSics, void *pData, /* curvature motors may be missing, anything else is a serious problem */ - status += testMotor(pNew, pCon, "a1", A1); - status += testMotor(pNew, pCon, "a2", A2); - status += testMotor(pNew, pCon, "a3", A3); - status += testMotor(pNew, pCon, "a4", A4); - status += testMotor(pNew, pCon, "sgu", SGU); - status += testMotor(pNew, pCon, "sgl", SGL); - status += testMotor(pNew, pCon, "a5", A5); - status += testMotor(pNew, pCon, "a6", A6); + status += testMotor(pNew, pCon, pNew->motname[A1], A1); + status += testMotor(pNew, pCon, pNew->motname[A2], A2); + status += testMotor(pNew, pCon, pNew->motname[A3], A3); + status += testMotor(pNew, pCon, pNew->motname[A4], A4); + status += testMotor(pNew, pCon, pNew->motname[SGU], SGU); + status += testMotor(pNew, pCon, pNew->motname[SGL], SGL); + status += testMotor(pNew, pCon, pNew->motname[A5], A5); + status += testMotor(pNew, pCon, pNew->motname[A6], A6); if (status != 8) { SCWrite(pCon, "ERROR: a required motor is missing, tasub NOT installed", eError);