- Reworked the connection object and the IO system
- Reworked the support for TRICS - Added a second generation motor
This commit is contained in:
24
interface.c
24
interface.c
@@ -167,6 +167,30 @@ int GetDrivablePosition(void *pObject, SConnection *pCon, float *fPos)
|
||||
{
|
||||
return (pICountable)FindInterface(pObject,COUNTID);
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int GetCountLock(pICountable self, SConnection *pCon)
|
||||
{
|
||||
if(self->running == 1)
|
||||
{
|
||||
SCWrite(pCon,"ERROR: someone else is already counting!", eError);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
self->running = 1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
void ReleaseCountLock(pICountable self)
|
||||
{
|
||||
self->running = 0;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int isRunning(pICountable self)
|
||||
{
|
||||
return self->running;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
pICallBack GetCallbackInterface(void *pObject)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user