Added "part" identifier for motors. It names the assembly which a motor belongs to, eg sample, crystal, filter.

r1756 | ffr | 2007-03-31 13:33:54 +1000 (Sat, 31 Mar 2007) | 2 lines
This commit is contained in:
Ferdi Franceschini
2007-03-31 13:33:54 +10:00
committed by Douglas Clowes
parent 210e61e1b8
commit f0a3d8f18c

View File

@@ -73,6 +73,7 @@ typedef struct __MoDriv {
char *errorMsg; /**< Points to memory for error messages */
char units[256]; /**< physical units for axis */
char long_name[256]; /**< long name of motor */
char part[256]; /**< assembly which motor belongs to */
float speed; /**< physical units per second */
float maxSpeed; /**< physical units per second */
float accel; /**< physical units per second^2 */
@@ -2028,6 +2029,18 @@ int DMC2280Action(SConnection *pCon, SicsInterp *pSics, void *pData,
}
return 1;
}
if (strcasecmp("part", argv[1]) == 0) {
if (argc > 2) {
strncpy(self->part, argv[2], sizeof(self->part));
self->part[sizeof(self->part) - 1] = '\0';
}
else {
char line[132];
snprintf(line, 132, "%s.part = %s", self->name, self->part);
SCWrite(pCon, line, eValue);
}
return 1;
}
if (strcasecmp("list", argv[1]) == 0) {
}
}