Skip to content

Commit

Permalink
Prevent acquisition being started with no chips enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
timcnicholls committed Sep 3, 2020
1 parent a1c66ba commit f276c31
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions control/fem_api_extension/api/src/ExcaliburFemClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,14 @@ void ExcaliburFemClient::startAcquisition(void)
FEMLOG(mFemId, logDEBUG) << "Chip mask: 0x" << std::hex << chipMask << std::dec
<< " First chip active: " << firstChipActive;

// Raise an error if no chips are enabled
if (chipMask == 0)
{
throw FemClientException((FemClientErrorCode) excaliburFemClientIllegalChipId,
"Cannot start acquisition, no MPX chips are enabled"
);
}

// Set up the ASIC mux based on calculated chip mask
this->asicControlMuxSet(chipMask);

Expand Down

0 comments on commit f276c31

Please sign in to comment.