Skip to content

Fix usage of RestAPI::trigger#99

Open
ericonr wants to merge 1 commit intoareaDetector:masterfrom
ericonr:restapi-trigger
Open

Fix usage of RestAPI::trigger#99
ericonr wants to merge 1 commit intoareaDetector:masterfrom
ericonr:restapi-trigger

Conversation

@ericonr
Copy link
Copy Markdown
Member

@ericonr ericonr commented Apr 27, 2026

This method expects its second parameter, 'exposure', to be 0 when using internal series, since in that case it's not necessary to send an updated acquireTime parameter. When in internal series mode, the Simplon API correctly waits for the acquisition to be complete to return, and the additional waiting implemented in RestAPI::trigger isn't necessary.

The conditional here checks for TRIGGER_MODE_INTE because TRIGGER_MODE_INTS and TRIGGER_MODE_CONTINUOUS both map to internal series trigger and don't suffer from this issue.


RestAPI::trigger has two ways it can be called, for Internal Series and Enable:

int RestAPI::trigger (int timeout, double exposure)
{
// Trigger for INTS mode
if(!exposure)
return put(SSCommand, "trigger", "", NULL, timeout);
// Trigger for INTE mode
// putDouble should block for the whole exposure duration, but it doesn't
// (Eiger's fault)
char exposureStr[MAX_BUF_SIZE];

This method expects its second parameter, 'exposure', to be 0 when using
internal series, since in that case it's not necessary to send an
updated acquireTime parameter. When in internal series mode, the Simplon
API correctly waits for the acquisition to be complete to return, and
the additional waiting implemented in RestAPI::trigger isn't necessary.

The conditional here checks for TRIGGER_MODE_INTE because
TRIGGER_MODE_INTS and TRIGGER_MODE_CONTINUOUS both map to internal
series trigger and don't suffer from this issue.
Copy link
Copy Markdown
Member

@MarkRivers MarkRivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants