-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCRSBlockedState.m
More file actions
41 lines (32 loc) · 901 Bytes
/
CRSBlockedState.m
File metadata and controls
41 lines (32 loc) · 901 Bytes
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
//
// CRSBlockedState.m
// Experiment
//
// Copyright (c) 2006. All rights reserved.
//
#import "CRSBlockedState.h"
#import "CRSUtilities.h"
@implementation CRSBlockedState
- (void)stateAction {
[[task dataDoc] putEvent:@"blocked"];
// schedule(&bNode, (PSCHED)&blockedTones, PRISYS - 1, 400, -1, NULL);
expireTime = [LLSystemUtil timeFromNow:[[task defaults] integerForKey:CRSAcquireMSKey]];
}
- (NSString *)name {
return @"CRSBlocked";
}
- (LLState *)nextState {
if (![[task defaults] boolForKey:CRSFixateKey] || ![CRSUtilities inWindow:fixWindow]) {
return [[task stateSystem] stateNamed:@"CRSFixon"];
}
if ([task mode] == kTaskIdle) {
eotCode = kMyEOTQuit;
return [[task stateSystem] stateNamed:@"Endtrial"];;
}
if ([LLSystemUtil timeIsPast:expireTime]) {
eotCode = kMyEOTIgnored;
return [[task stateSystem] stateNamed:@"Endtrial"];;
}
return nil;
}
@end