-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCRSStimulate.m
48 lines (39 loc) · 968 Bytes
/
CRSStimulate.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// CRSStimulate.m
// CRSMap
//
// Copyright (c) 2006. All rights reserved.
//
#import "CRSStimulate.h"
#import "CRSUtilities.h"
@implementation CRSStimulate
- (void)stateAction;
{
[stimuli startStimSequence];
}
- (NSString *)name {
return @"CRSStimulate";
}
- (LLState *)nextState {
if ([task mode] == kTaskIdle) {
eotCode = kMyEOTQuit;
return [[task stateSystem] stateNamed:@"Endtrial"];;
}
if ([stimuli targetPresented]) {
if ([[task defaults] boolForKey: CRSFixateOnlyKey]) {
eotCode = kMyEOTCorrect;
return [[task stateSystem] stateNamed:@"Endtrial"];
}
return [[task stateSystem] stateNamed:@"CRSTooFast"];
}
if ([[task defaults] boolForKey:CRSFixateKey] && ![CRSUtilities inWindow:fixWindow]) {
eotCode = kMyEOTBroke;
return [[task stateSystem] stateNamed:@"CRSSaccade"];;
}
if (![stimuli stimulusOn]) {
eotCode = kMyEOTCorrect;
return [[task stateSystem] stateNamed:@"Endtrial"];;
}
return nil;
}
@end