improvements:

- added is_running to driveable ease objects
- ighdriv.c: try <maxtry> times when status reply failes
- ipsdriv.c: fix trainedTo parameter
- reduced SEA version of SICS
This commit is contained in:
2021-09-16 12:35:06 +02:00
parent 21299efa80
commit f16d738b4a
10 changed files with 607 additions and 80 deletions

View File

@ -164,6 +164,7 @@ static int ArrayMakeItem(void *object, void *delete, int argc,
*last = item->next; /* remove item from list */
item->next = arr->freeItems;
arr->freeItems = item;
ParKillPar(arr, item->name);
return 1;
}
break;
@ -230,7 +231,7 @@ static int ArrayMakeItem(void *object, void *delete, int argc,
item->unit = strdup(item->unit);
if (item->value)
item->value = strdup(item->value);
ParInitPar(object, item->name);
ParInitPar(object, item->name, arr->logged);
SCparChange(arr->p.conn);
return 1;
@ -318,6 +319,7 @@ static void ArrayObjParDef(void *object)
if (ParActionIs(PAR_KILL)) {
for (item = arr->items; item != NULL; item = next) {
next = item->next;
ParKillPar(arr, item->name);
if (item->name)
free(item->name);
if (item->unit)
@ -350,7 +352,7 @@ static int ArrayObjInit(SConnection * con, int argc, char *argv[],
creationCmd = Arg2Tcl(argc, argv, NULL, 0);
}
arr = ParMake(con, argv[1], &arrayObjClass, ArrayObjParDef, creationCmd);
if (argc > 2 && strcasecmp(argv[2], "logged") == 0) {
if (argc > 3 && strcasecmp(argv[3], "logged") == 0) {
arr->logged = 1;
} else {
arr->logged = 0;