Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Reworked stopping of state machine (addition to older fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
MPIBR-kretschmerf committed Nov 17, 2017
1 parent 2855c54 commit 3631ad1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions StateMachineController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ StateMachineController::~StateMachineController()

void StateMachineController::startStateMachine(audioGameSettings settings)
{
nidaq->DAQmxInitializeInterface();
if(stateMachine->isRunning()) //this should not happen
stopStateMachine();
//stateMachine->stop();

if(stateMachine->isRunning())
stateMachine->stop();
nidaq->DAQmxInitializeInterface();

this->settings = settings;
trialsCurrent = 1; // set index for first trial (1-based)
Expand All @@ -147,6 +148,7 @@ void StateMachineController::pauseStateMachine()

void StateMachineController::stopStateMachine()
{
qDebug()<<"StateMachineController:stopStateMachine()";
timerDialog->removeTimer();
mainTimer->stop();
stateMachine->stop();
Expand Down

0 comments on commit 3631ad1

Please sign in to comment.