-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGRFBlockedState.m
More file actions
41 lines (32 loc) · 899 Bytes
/
GRFBlockedState.m
File metadata and controls
41 lines (32 loc) · 899 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
//
// GRFBlockedState.m
// Experiment
//
// Copyright (c) 2006. All rights reserved.
//
#import "GRFBlockedState.h"
#import "GRFUtilities.h"
@implementation GRFBlockedState
- (void)stateAction {
[[task dataDoc] putEvent:@"blocked"];
// schedule(&bNode, (PSCHED)&blockedTones, PRISYS - 1, 400, -1, NULL);
expireTime = [LLSystemUtil timeFromNow:[[task defaults] integerForKey:GRFAcquireMSKey]];
}
- (NSString *)name {
return @"GRFBlocked";
}
- (LLState *)nextState {
if (![[task defaults] boolForKey:GRFFixateKey] || ![GRFUtilities inWindow:fixWindow]) {
return [[task stateSystem] stateNamed:@"GRFFixon"];
}
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