- Fixed sicsprompt bug. Sicsprompt caused a core dump
- Removed generation of incommenurate reflections for 0,0,0 in fourmess.c - Implemented a Poch command for heartbeats - Fixed 64 bit dimension issues in nxdict - Fixed different calling conventions for NXReportError deep stack in nxdict - Stopped ei motor driving when not necessary - Added yet another monitor for POLDI - Added a protocoll driver for the JVL motor RS-485 binary protocoll - Fixed some reporting issues SKIPPED: psi/jvlprot.c psi/make_gen psi/polterwrite.c psi/psi.c psi/spss7.c
This commit is contained in:
18
tasdrive.c
18
tasdrive.c
@ -40,6 +40,8 @@ static long TASSetValue(void *pData, SConnection * pCon, float value)
|
||||
{
|
||||
ptasMot self = (ptasMot) pData;
|
||||
assert(self);
|
||||
int qcodes[] = {3,4,5,8}; /* qh,qk,ql, en */
|
||||
int i;
|
||||
|
||||
if (self->code > 5 && self->math->tasMode == ELASTIC) {
|
||||
SCWrite(pCon, "ERROR: cannot drive this motor in elastic mode",
|
||||
@ -48,6 +50,11 @@ static long TASSetValue(void *pData, SConnection * pCon, float value)
|
||||
}
|
||||
setTasPar(&self->math->target, self->math->tasMode, self->code, value);
|
||||
self->math->mustDrive = 1;
|
||||
for(i = 0; i < 4; i++){
|
||||
if(self->code == qcodes[i]) {
|
||||
self->math->mustDriveQ = 1;
|
||||
}
|
||||
}
|
||||
return OKOK;
|
||||
}
|
||||
|
||||
@ -525,16 +532,25 @@ static int calculateAndDrive(ptasMot self, SConnection * pCon)
|
||||
driveTilt = 0;
|
||||
}
|
||||
|
||||
if(self->math->mustDriveQ == 0){
|
||||
driveQ = 0;
|
||||
}
|
||||
|
||||
|
||||
if (driveQ != 0) {
|
||||
if (!checkQMotorLimits(self, pCon, angles, driveTilt)) {
|
||||
driveQ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (driveQ == 0) {
|
||||
if (driveQ == 0 && self->math->mustDriveQ == 1) {
|
||||
SCWrite(pCon, "WARNING: NOT driving Q-vector because of errors",
|
||||
eError);
|
||||
}
|
||||
/*
|
||||
* reset the Q flag
|
||||
*/
|
||||
self->math->mustDriveQ = 0;
|
||||
return startMotors(self, angles, pCon, driveQ, driveTilt);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user