- SECoP protocol for scriptcontext

This commit is contained in:
2018-05-07 13:53:51 +02:00
parent da2b8c13d4
commit 19b3c71274
15 changed files with 288 additions and 27 deletions

View File

@ -121,17 +121,17 @@ int Drive(SConnection * pCon, SicsInterp * pInter, char *name, float fNew)
if (iRet == DEVINT) {
if (SCGetInterrupt(pCon) == eAbortOperation) {
SCSetInterrupt(pCon, eContinue);
snprintf(pBueffel, 511, "Driving %s aborted at %9.3f", name, fPos);
snprintf(pBueffel, 511, "Driving %s aborted at %.6g", name, fPos);
SCWrite(pCon, pBueffel, eError);
}
return 0;
} else if (iRet == DEVDONE) {
snprintf(pBueffel, 511, "Driving %s to %9.3f done", name, fPos);
snprintf(pBueffel, 511, "Driving %s to %.6g done", name, fPos);
SCWrite(pCon, pBueffel, eValue);
return 1;
} else {
snprintf(pBueffel, 511,
"Driving %s finished with problems, position: %9.3f", name,
"Driving %s finished with problems, position: %.6g", name,
fPos);
SCWrite(pCon, pBueffel, eValue);
return 1;
@ -341,7 +341,7 @@ int DriveWrapper(SConnection * pCon, SicsInterp * pSics, void *pData,
/* print positions */
for (i = 1; i < argc; i += 2) {
snprintf(pBueffel,511, "New %s position: %9.3f", argv[i],
snprintf(pBueffel,511, "New %s position: %.6g", argv[i],
findPosition(pSics, pCon, argv[i]));
SCWrite(pCon, pBueffel, eValue);
}