There has been a continuous problem that the counter:CheckStatus function

called from the status task messed up count processing. This has now been
resolved in this way:
- A new function ReadStatus and  a lastStatus filed have been added
  to the countable interface.
- CountTaskFunc updates the lastStatus field.
- ReadStatus just returns that field.
- ReadStatus is now being called by the status task.
This commit is contained in:
2016-03-15 11:24:50 +01:00
parent 18816067db
commit 1b2022a5e9
4 changed files with 17 additions and 3 deletions

View File

@ -400,7 +400,7 @@ static int CheckCountStatus(void *message, void *userData)
for(it = TaskIteratorStart(pServ->pTasker); it != NULL; it = TaskIteratorNext(it)){
countTask = (CountTaskData *)GetTaskData(it);
if(countTask != NULL && countTask->id == COUNTID){
testStatus = countTask->pCount->CheckCountStatus(countTask->obj,pServ->dummyCon);
testStatus = countTask->pCount->ReadStatus(countTask->obj,pServ->dummyCon);
if(testStatus == HWNoBeam){
*status = eOutOfBeam;
}