ctb 1g non blocking acquire (#555)

* allowing ctb and moench 1g to have non blocking acquisition also send data, refactoring wait for acquisition finished for all others
This commit is contained in:
Dhanya Thattil
2022-09-16 17:45:51 +02:00
committed by GitHub
parent e385618d09
commit bac32dcba9
19 changed files with 99 additions and 146 deletions

View File

@ -3310,7 +3310,7 @@ void *start_timer(void *arg) {
}
sharedMemory_setStatus(IDLE);
LOG(logINFOBLUE, ("Finished Acquiring\n"));
LOG(logINFOBLUE, ("Transmitting frames done\n"));
return NULL;
}
#endif
@ -3396,18 +3396,11 @@ enum runStatus getRunStatus() {
return s;
}
void readFrame(int *ret, char *mess) {
// wait for status to be done
void waitForAcquisitionEnd() {
while (runBusy()) {
usleep(500);
}
#ifdef VIRTUAL
LOG(logINFOGREEN, ("acquisition successfully finished\n"));
return;
#endif
*ret = (int)OK;
LOG(logINFOGREEN, ("Acquisition successfully finished\n"));
LOG(logINFOGREEN, ("Blocking Acquisition done\n"));
}
u_int32_t runBusy() {