Commit 4d703e0e authored by Xiaoying Pu's avatar Xiaoying Pu

MOUSETRACKER AND DIGIT RECALL CAN WORK TOGETHER NOW!

parent 59facce8
......@@ -20,11 +20,7 @@
<group>
<file>file:/Users/pxy/dm_task/src/util/Configurator.java</file>
<file>file:/Users/pxy/dm_task/src/util/Trial.java</file>
<file>file:/Users/pxy/dm_task/src/util/config.properties</file>
<file>file:/Users/pxy/dm_task/src/util/ActionType.java</file>
</group>
<group/>
</open-files>
</project-private>
......@@ -73,8 +73,9 @@ public class PrimaryTaskController {
//after some time, the facade interrupts and MouseTracker displays a break screen
// while the user recalls digits
// TODO: break also needs to wait for response message??????
//String breakMsg = this.theModel.getDecision(DecisionType.GETBREAK, state.toString());
//this.udpHandle.sendTrialAndRecvResponse(breakMsg);
String breakMsg = this.theModel.getDecision(DecisionType.GETBREAK, state.toString());
// Note: cannot use sendTrialAndRecvResponse because the recvfrom() will not hear back!!!!
this.udpHandle.sendBreakScreen(breakMsg);
};
new Thread(task).start();
}
......
......@@ -91,6 +91,19 @@ public class UDPController {
System.out.println("<<<" + message_received);
}
public void sendBreakScreen(String stimuli) {
/*
STEP 4: MATLAB sends trial information
*/
// String strTrialInfo = TrialSet[i] + currentResp1 + "," + currentResp2;
messageToSend = INTERFACE_ID + "," + MESSAGE_ID + "," + stimuli;
UDPHandler.send(messageToSend, HOST, SEND_PORT);
MESSAGE_ID++;
System.out.println(">>>" + messageToSend);
}
/**
* Loop between Step 4-5 for every trial (Send Stimuli to MouseTracker and
* Receive Responses)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment