Change movecount to millisecond rather than loop count because of faster loop count on newere hardware/software

r3611 | dcl | 2012-06-19 14:01:09 +1000 (Tue, 19 Jun 2012) | 1 line
This commit is contained in:
Douglas Clowes
2012-06-19 14:01:09 +10:00
parent 6891ac08ee
commit da624bba07
4 changed files with 25 additions and 2 deletions

View File

@@ -313,13 +313,24 @@ static int ConfCheckStatus(void *pData, SConnection *pCon){
event.fVal = self->pDriv->GetValue(self,pCon);
InvokeCallBack(self->pCall, MOTDRIVE, &event);
} else if (result == HWBusy) {
#if 1
double current_time, skip_time, DoubleTime(void);
current_time = DoubleTime();
skip_time = 0.500;
if (self->last_report_time + skip_time >= current_time)
#else
self->posCount++;
if(self->posCount >= 10/*ObVal(self->ParArray,MOVECOUNT)*/)
#endif
{
event.pName = self->name;
event.fVal = self->pDriv->GetValue(self,pCon);
InvokeCallBack(self->pCall, MOTDRIVE, &event);
#if 1
self->last_report_time = current_time;
#else
self->posCount = 0;
#endif
}
}
return result;