getmaster through stop server, allowing stopacq to first go to slave for eiger, eiger stop to first check reg value to send complete frames before calling stop

This commit is contained in:
2021-06-15 12:59:54 +02:00
parent 709293be68
commit b11f6c56e7
3 changed files with 42 additions and 35 deletions

View File

@ -998,14 +998,24 @@ int Feb_Control_StartAcquisition() {
int Feb_Control_StopAcquisition() {
if (Feb_Control_activated) {
// stop acquisition and also sends last frame
// sends last
unsigned int orig_value = 0;
if (!Feb_Interface_ReadRegister(Feb_Control_AddressToAll(),
DAQ_REG_CTRL, &orig_value)) {
LOG(logERROR, ("Could not read DAQ_REG_CHIP_CMDS to send software "
"trigger\n"));
return 0;
}
if (!Feb_Interface_WriteRegister(Feb_Control_AddressToAll(),
DAQ_REG_CTRL, DAQ_CTRL_STOP, 0, 0)) {
DAQ_REG_CTRL,
orig_value | DAQ_CTRL_STOP, 0, 0)) {
LOG(logERROR, ("Could not send last frames.\n"));
return 0;
}
// stop acquisition
return Feb_Control_Reset();
}
return Feb_Control_Reset();
return 1;
}
int Feb_Control_SoftwareTrigger() {