- Removed slit 5 from amorset.c
- poldizug now sends all codes all the time - polterwrite writes the filename again - sanswave has been modifed to support the new second generation velocity selector - sinqhttprot has been mdified to copy data to nodes, this for the second generation HM object - tasscan suppressed some output
This commit is contained in:
15
poldizug.c
15
poldizug.c
@ -23,7 +23,6 @@ typedef struct {
|
||||
pIDrivable pDriv;
|
||||
prs232 controller;
|
||||
int iMode;
|
||||
int state;
|
||||
float maxForce, minForce;
|
||||
float maxPos, minPos;
|
||||
int velocity;
|
||||
@ -149,7 +148,6 @@ static long PZRSetValue(void *data, SConnection * pCon, float val)
|
||||
|
||||
switch (self->iMode) {
|
||||
case FORCE:
|
||||
if (self->state == OFF) {
|
||||
snprintf(command, 79, "wr vel %d\r\n", self->velocity);
|
||||
status = PZRCommand(self->controller, pCon, command, reply, 79);
|
||||
if (status != 1) {
|
||||
@ -165,19 +163,9 @@ static long PZRSetValue(void *data, SConnection * pCon, float val)
|
||||
if (status != 1) {
|
||||
return HWFault;
|
||||
}
|
||||
self->state = REGEL;
|
||||
return OKOK;
|
||||
} else {
|
||||
snprintf(command, 79, "wr force %f\r\n", val);
|
||||
status = PZRCommand(self->controller, pCon, command, reply, 79);
|
||||
if (status != 1) {
|
||||
return HWFault;
|
||||
}
|
||||
return OKOK;
|
||||
}
|
||||
break;
|
||||
case ZUGPOS:
|
||||
self->state = OFF;
|
||||
snprintf(command, 79, "wr vel %d\r\n", self->velocity);
|
||||
status = PZRCommand(self->controller, pCon, command, reply, 79);
|
||||
if (status != 1) {
|
||||
@ -325,7 +313,6 @@ static int PZRConnect(pPZR self, SConnection * pCon)
|
||||
int status;
|
||||
|
||||
closeRS232(self->controller);
|
||||
self->state = OFF;
|
||||
status = initRS232(self->controller);
|
||||
if (status < 0) {
|
||||
getRS232Error(status, error, 131);
|
||||
@ -451,7 +438,6 @@ static int PoldiReissAction(SConnection * pCon, SicsInterp * pSics,
|
||||
} else if (strcmp(argv[1], "off") == 0) {
|
||||
status =
|
||||
PZRCommand(self->controller, pCon, "wr mode 0\r\n", reply, 79);
|
||||
self->state = OFF;
|
||||
if (status == 1) {
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
@ -519,7 +505,6 @@ int MakePoldiReiss(SConnection * pCon, SicsInterp * pSics,
|
||||
self->minPos = atof(argv[6]);
|
||||
self->maxPos = atof(argv[7]);
|
||||
self->iMode = FORCE;
|
||||
self->state = OFF;
|
||||
self->velocity = 2;
|
||||
PZRCommand(self->controller, pCon, "wr mode 0\r\n", reply, 79);
|
||||
|
||||
|
Reference in New Issue
Block a user