diff --git a/broker/JFJochStateMachine.cpp b/broker/JFJochStateMachine.cpp index 615e0f81..041c060d 100644 --- a/broker/JFJochStateMachine.cpp +++ b/broker/JFJochStateMachine.cpp @@ -307,11 +307,11 @@ void JFJochStateMachine::Initialize() { void JFJochStateMachine::Pedestal() { std::unique_lock ul(m); - SetState(JFJochState::Busy, "Updating calibration", BrokerStatus::MessageSeverity::Info); - if (state != JFJochState::Idle) throw WrongDAQStateException("Must be idle to take pedestal"); + SetState(JFJochState::Busy, "Updating calibration", BrokerStatus::MessageSeverity::Info); + measurement = std::async(std::launch::async, &JFJochStateMachine::CalibrateDetector, this, std::move(ul)); }