- Changes to the old TAS initialisation system to have ss and sa to be processed

properly. Requires a script scatfix to exist
This commit is contained in:
2014-07-15 16:47:32 +02:00
parent 7d986b1a9f
commit ce371d6837
2 changed files with 14 additions and 4 deletions

3
psi.c
View File

@ -34,7 +34,6 @@
#include "el755driv.h" #include "el755driv.h"
#include <evdriver.i> #include <evdriver.i>
#include "serial.h" #include "serial.h"
#include "sinq.h"
#include "sinqhttp.h" #include "sinqhttp.h"
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
@ -119,8 +118,6 @@ static void AddPsiCommands(SicsInterp * pInter)
PCMD("MakeRuenBuffer", InitBufferSys); PCMD("MakeRuenBuffer", InitBufferSys);
SCMD("MakeSansliRebin", MakeSansliRebin); SCMD("MakeSansliRebin", MakeSansliRebin);
SCMD("MakeSANSWave", MakeSANSWave); SCMD("MakeSANSWave", MakeSANSWave);
SCMD("MakeSinq", SinqFactory);
SCMD("MakeSinqRedirect", SinqRedirectFactory);
SCMD("MakeSPS", SPSFactory); SCMD("MakeSPS", SPSFactory);
SCMD("MakeSPSS7", MakeSPSS7); SCMD("MakeSPSS7", MakeSPSS7);
PCMD("MakeSWHPMotor", MakeSWHPMotor); PCMD("MakeSWHPMotor", MakeSWHPMotor);

View File

@ -226,10 +226,11 @@ char *tasVariableOrder[MAXPAR + 1] = {
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
static int TasSaveStatus(void *self, char *name, FILE * fd) static int TasSaveStatus(void *self, char *name, FILE * fd)
{ {
int i = 0; int i = 0, iscat;
pMotor pMot; pMotor pMot;
float value; float value;
SConnection *pCon = NULL; SConnection *pCon = NULL;
pSicsVariable pScat = NULL;
pCon = SCCreateDummyConnection(pServ->pSics); pCon = SCCreateDummyConnection(pServ->pSics);
if (!pCon) { if (!pCon) {
@ -252,9 +253,21 @@ static int TasSaveStatus(void *self, char *name, FILE * fd)
MotorGetSoftPosition(pMot,pCon,&value); MotorGetSoftPosition(pMot,pCon,&value);
fprintf(fd,"run %s %f\n",tasMotorOrder[i], value); fprintf(fd,"run %s %f\n",tasMotorOrder[i], value);
*/ */
} }
i++; i++;
} }
pScat = (pSicsVariable)FindCommandData(pServ->pSics,"SS","SicsVariable");
if(pScat != NULL){
VarGetInt(pScat,&iscat);
fprintf(fd,"catch {scatfix ss %d}\n", iscat);
}
pScat = (pSicsVariable)FindCommandData(pServ->pSics,"SA","SicsVariable");
if(pScat != NULL){
VarGetInt(pScat,&iscat);
fprintf(fd,"catch {scatfix sa %d}\n", iscat);
}
SCDeleteConnection(pCon); SCDeleteConnection(pCon);
/* /*
fprintf(fd,"success\n"); fprintf(fd,"success\n");