- Fixed a sign problem in amorset.c regarding aom and cox
- Fixed a bad encoding of float values when writing to the SPS
This commit is contained in:
@ -272,7 +272,7 @@ static int updateActualPositions(pamorSet self, SConnection * pCon)
|
|||||||
aoz = getListMotorPosition(readList, "aoz");
|
aoz = getListMotorPosition(readList, "aoz");
|
||||||
sah = ABS(calcCompPosition(&self->A) - calcCompPosition(&self->S));
|
sah = ABS(calcCompPosition(&self->A) - calcCompPosition(&self->S));
|
||||||
self->actuals2t = Atand((aoz-soz)/sah) + self->actualm2t;
|
self->actuals2t = Atand((aoz-soz)/sah) + self->actualm2t;
|
||||||
self->actualath = self->actuals2t - self->actualm2t - aom;
|
self->actualath = -(self->actuals2t - self->actualm2t - aom);
|
||||||
} else {
|
} else {
|
||||||
com = getListMotorPosition(readList, "com");
|
com = getListMotorPosition(readList, "com");
|
||||||
self->actuals2t = com + self->actualm2t;
|
self->actuals2t = com + self->actualm2t;
|
||||||
|
3
spss7.c
3
spss7.c
@ -290,7 +290,8 @@ static hdbCallbackReturn S7WriteCallback(pHdb currentNode,
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
fval = (float)mm->v->v.doubleValue;
|
fval = (float)mm->v->v.doubleValue;
|
||||||
idata = htonl((int)fval);
|
memcpy(&idata,&fval,4);
|
||||||
|
idata = htonl(idata);
|
||||||
MakeWriteMessage(writeAction,offset,4,&idata);
|
MakeWriteMessage(writeAction,offset,4,&idata);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user