Skip to content

Commit

Permalink
Stable Release 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshay committed Sep 4, 2018
1 parent 8a44bce commit 95425a8
Show file tree
Hide file tree
Showing 413 changed files with 5,794 additions and 2,070 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LFS-Files/* filter=lfs diff=lfs merge=lfs -text
2 changes: 2 additions & 0 deletions .lfsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[lfs]
fetchexclude = *
22 changes: 19 additions & 3 deletions ResearchKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@
7118AC7720BF6A7800D7A6BB /* ORKSpeechInNoiseContentView.h in Headers */ = {isa = PBXBuildFile; fileRef = 7118AC7120BF6A7800D7A6BB /* ORKSpeechInNoiseContentView.h */; };
7118AC7820BF6A7800D7A6BB /* ORKSpeechInNoiseStep.m in Sources */ = {isa = PBXBuildFile; fileRef = 7118AC7220BF6A7800D7A6BB /* ORKSpeechInNoiseStep.m */; };
7118AC7920BF6A7800D7A6BB /* ORKSpeechInNoiseStep.h in Headers */ = {isa = PBXBuildFile; fileRef = 7118AC7320BF6A7800D7A6BB /* ORKSpeechInNoiseStep.h */; settings = {ATTRIBUTES = (Public, ); }; };
713D4B1020FE4702002BE28D /* volume_curve_WIRED.plist in Resources */ = {isa = PBXBuildFile; fileRef = 713D4B0F20FE4702002BE28D /* volume_curve_WIRED.plist */; };
713D4B1C20FE5464002BE28D /* frequency_dBSPL_EARPODS.plist in Resources */ = {isa = PBXBuildFile; fileRef = 713D4B1B20FE5464002BE28D /* frequency_dBSPL_EARPODS.plist */; };
713D4B1E20FE5480002BE28D /* retspl_EARPODS.plist in Resources */ = {isa = PBXBuildFile; fileRef = 713D4B1D20FE5480002BE28D /* retspl_EARPODS.plist */; };
716B126420A78C6B00590264 /* ORKEnvironmentSPLMeterResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 716B126220A78C6B00590264 /* ORKEnvironmentSPLMeterResult.h */; };
716B126520A78C6B00590264 /* ORKEnvironmentSPLMeterResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 716B126320A78C6B00590264 /* ORKEnvironmentSPLMeterResult.m */; };
716B126820A7A40400590264 /* ORKdBHLToneAudiometryAudioGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 716B126620A7A40400590264 /* ORKdBHLToneAudiometryAudioGenerator.h */; };
Expand Down Expand Up @@ -184,6 +187,7 @@
71BD9EAE2096A26C007B436E /* ORKEnvironmentSPLMeterContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 71BD9EAC2096A26C007B436E /* ORKEnvironmentSPLMeterContentView.m */; };
71D8EF1720B9EE1900EBCDC6 /* ORKHealthClinicalTypeRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 71D8EF1520B9EE1900EBCDC6 /* ORKHealthClinicalTypeRecorder.h */; settings = {ATTRIBUTES = (Private, ); }; };
71D8EF1820B9EE1900EBCDC6 /* ORKHealthClinicalTypeRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 71D8EF1620B9EE1900EBCDC6 /* ORKHealthClinicalTypeRecorder.m */; };
71F3B28021001DED00FB1C41 /* splMeter_sensitivity_offset.plist in Resources */ = {isa = PBXBuildFile; fileRef = 71F3B27F21001DEC00FB1C41 /* splMeter_sensitivity_offset.plist */; };
781D54101DF886AB00223305 /* ORKTrailmakingContentView.h in Headers */ = {isa = PBXBuildFile; fileRef = 781D540A1DF886AB00223305 /* ORKTrailmakingContentView.h */; };
781D54111DF886AB00223305 /* ORKTrailmakingContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 781D540B1DF886AB00223305 /* ORKTrailmakingContentView.m */; };
781D54121DF886AB00223305 /* ORKTrailmakingStep.h in Headers */ = {isa = PBXBuildFile; fileRef = 781D540C1DF886AB00223305 /* ORKTrailmakingStep.h */; settings = {ATTRIBUTES = (Private, ); }; };
Expand Down Expand Up @@ -877,6 +881,9 @@
7118AC7120BF6A7800D7A6BB /* ORKSpeechInNoiseContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKSpeechInNoiseContentView.h; sourceTree = "<group>"; };
7118AC7220BF6A7800D7A6BB /* ORKSpeechInNoiseStep.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKSpeechInNoiseStep.m; sourceTree = "<group>"; };
7118AC7320BF6A7800D7A6BB /* ORKSpeechInNoiseStep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKSpeechInNoiseStep.h; sourceTree = "<group>"; };
713D4B0F20FE4702002BE28D /* volume_curve_WIRED.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = volume_curve_WIRED.plist; sourceTree = "<group>"; };
713D4B1B20FE5464002BE28D /* frequency_dBSPL_EARPODS.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = frequency_dBSPL_EARPODS.plist; sourceTree = "<group>"; };
713D4B1D20FE5480002BE28D /* retspl_EARPODS.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = retspl_EARPODS.plist; sourceTree = "<group>"; };
716B126220A78C6B00590264 /* ORKEnvironmentSPLMeterResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ORKEnvironmentSPLMeterResult.h; sourceTree = "<group>"; };
716B126320A78C6B00590264 /* ORKEnvironmentSPLMeterResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ORKEnvironmentSPLMeterResult.m; sourceTree = "<group>"; };
716B126620A7A40400590264 /* ORKdBHLToneAudiometryAudioGenerator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ORKdBHLToneAudiometryAudioGenerator.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -904,6 +911,7 @@
71BD9EAC2096A26C007B436E /* ORKEnvironmentSPLMeterContentView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ORKEnvironmentSPLMeterContentView.m; sourceTree = "<group>"; };
71D8EF1520B9EE1900EBCDC6 /* ORKHealthClinicalTypeRecorder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ORKHealthClinicalTypeRecorder.h; sourceTree = "<group>"; };
71D8EF1620B9EE1900EBCDC6 /* ORKHealthClinicalTypeRecorder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ORKHealthClinicalTypeRecorder.m; sourceTree = "<group>"; };
71F3B27F21001DEC00FB1C41 /* splMeter_sensitivity_offset.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = splMeter_sensitivity_offset.plist; sourceTree = "<group>"; };
781D540A1DF886AB00223305 /* ORKTrailmakingContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKTrailmakingContentView.h; sourceTree = "<group>"; };
781D540B1DF886AB00223305 /* ORKTrailmakingContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKTrailmakingContentView.m; sourceTree = "<group>"; };
781D540C1DF886AB00223305 /* ORKTrailmakingStep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKTrailmakingStep.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1896,8 +1904,11 @@
71769E3B20884DB800A19914 /* ORKdBHLToneAudiometryStepViewController.h */,
71769E3C20884DB800A19914 /* ORKdBHLToneAudiometryStepViewController.m */,
71B7B4D820AA91D400C5768A /* frequency_dBSPL_AIRPODS.plist */,
713D4B1B20FE5464002BE28D /* frequency_dBSPL_EARPODS.plist */,
71B7B4D420AA91D300C5768A /* retspl_AIRPODS.plist */,
713D4B1D20FE5480002BE28D /* retspl_EARPODS.plist */,
71B7B4D920AA91D400C5768A /* volume_curve_AIRPODS.plist */,
713D4B0F20FE4702002BE28D /* volume_curve_WIRED.plist */,
);
name = "dBHL Tone Audiometry";
sourceTree = "<group>";
Expand All @@ -1913,6 +1924,7 @@
716B126320A78C6B00590264 /* ORKEnvironmentSPLMeterResult.m */,
71BD9EAB2096A26C007B436E /* ORKEnvironmentSPLMeterContentView.h */,
71BD9EAC2096A26C007B436E /* ORKEnvironmentSPLMeterContentView.m */,
71F3B27F21001DEC00FB1C41 /* splMeter_sensitivity_offset.plist */,
);
name = evironmentSPLMeter;
sourceTree = "<group>";
Expand Down Expand Up @@ -3453,7 +3465,7 @@
attributes = {
CLASSPREFIX = ORK;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0940;
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = researchkit.org;
TargetAttributes = {
86CC8E991AC09332001CCD89 = {
Expand Down Expand Up @@ -3550,10 +3562,14 @@
86C40DFA1A8D7C5C00081FAC /* MovieTintShader.fsh in Resources */,
B1A860EA1A9693C400EA57B7 /* [email protected] in Resources */,
71B7B4DA20AA91D400C5768A /* retspl_AIRPODS.plist in Resources */,
71F3B28021001DED00FB1C41 /* splMeter_sensitivity_offset.plist in Resources */,
713D4B1E20FE5480002BE28D /* retspl_EARPODS.plist in Resources */,
B1A860F31A9693C400EA57B7 /* [email protected] in Resources */,
B1A860F11A9693C400EA57B7 /* [email protected] in Resources */,
B1A860F71A9693C400EA57B7 /* [email protected] in Resources */,
713D4B1020FE4702002BE28D /* volume_curve_WIRED.plist in Resources */,
7118AC5D20BF6A1200D7A6BB /* Window.wav in Resources */,
713D4B1C20FE5464002BE28D /* frequency_dBSPL_EARPODS.plist in Resources */,
B1A860F21A9693C400EA57B7 /* [email protected] in Resources */,
B1A860EB1A9693C400EA57B7 /* [email protected] in Resources */,
7118AC5A20BF6A0000D7A6BB /* Noise.wav in Resources */,
Expand Down Expand Up @@ -4026,7 +4042,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -4079,7 +4095,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion ResearchKit.xcodeproj/xcshareddata/xcschemes/docs.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
15 changes: 9 additions & 6 deletions ResearchKit/ActiveTasks/ORKActiveStepViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,49 +149,52 @@ - (void)setupConstraints {
[NSLayoutConstraint deactivateConstraints:_constraints];
}
_constraints = nil;

UIView *viewForiPad = [self viewForiPadLayoutConstraints];

_activeStepView.translatesAutoresizingMaskIntoConstraints = NO;
_navigationFooterView.translatesAutoresizingMaskIntoConstraints = NO;

_constraints = @[
[NSLayoutConstraint constraintWithItem:_activeStepView
attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual
toItem:self.view.safeAreaLayoutGuide
toItem:viewForiPad ? : self.view.safeAreaLayoutGuide
attribute:NSLayoutAttributeTop
multiplier:1.0
constant:0.0],
[NSLayoutConstraint constraintWithItem:_activeStepView
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual
toItem:self.view.safeAreaLayoutGuide
toItem:viewForiPad ? : self.view.safeAreaLayoutGuide
attribute:NSLayoutAttributeLeft
multiplier:1.0
constant:0.0],
[NSLayoutConstraint constraintWithItem:_activeStepView
attribute:NSLayoutAttributeRight
relatedBy:NSLayoutRelationEqual
toItem:self.view.safeAreaLayoutGuide
toItem:viewForiPad ? : self.view.safeAreaLayoutGuide
attribute:NSLayoutAttributeRight
multiplier:1.0
constant:0.0],
[NSLayoutConstraint constraintWithItem:_navigationFooterView
attribute:NSLayoutAttributeBottom
relatedBy:NSLayoutRelationEqual
toItem:self.view
toItem:viewForiPad ? : self.view
attribute:NSLayoutAttributeBottom
multiplier:1.0
constant:0.0],
[NSLayoutConstraint constraintWithItem:_navigationFooterView
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual
toItem:self.view
toItem:viewForiPad ? : self.view
attribute:NSLayoutAttributeLeft
multiplier:1.0
constant:0.0],
[NSLayoutConstraint constraintWithItem:_navigationFooterView
attribute:NSLayoutAttributeRight
relatedBy:NSLayoutRelationEqual
toItem:self.view
toItem:viewForiPad ? : self.view
attribute:NSLayoutAttributeRight
multiplier:1.0
constant:0.0],
Expand Down
2 changes: 1 addition & 1 deletion ResearchKit/ActiveTasks/ORKAmslerGridStepViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ - (instancetype)initWithStep:(ORKStep *)step {
if (self) {
self.suspendIfInactive = YES;
}
self.shouldIgnoreiPadDesign = YES;
return self;
}

Expand Down Expand Up @@ -98,7 +99,6 @@ - (void)viewDidLoad {
self.activeStepView.accessibilityLabel = ORKLocalizedString(@"AX_AMSLER_GRID_LABEL", nil);
self.activeStepView.accessibilityHint = ORKLocalizedString(@"AX_AMSLER_GRID_HINT", nil);
self.activeStepView.accessibilityTraits = UIAccessibilityTraitImage | UIAccessibilityTraitAllowsDirectInteraction;

[self setupContraints];
}

Expand Down
2 changes: 1 addition & 1 deletion ResearchKit/ActiveTasks/ORKAudioGraphView.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ - (void)drawRect:(CGRect)rect {
CGRect bounds = self.bounds;

CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, ORKColor(ORKBackgroundColorKey).CGColor);
CGContextSetFillColorWithColor(context, ORKNeedWideScreenDesign(self) ? ORKColor(ORKiPadBackgroundViewColorKey).CGColor : ORKColor(ORKBackgroundColorKey).CGColor);
CGContextFillRect(context, bounds);

CGFloat scale = self.window.screen.scale;
Expand Down
2 changes: 2 additions & 0 deletions ResearchKit/ActiveTasks/ORKEnvironmentSPLMeterResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

@interface ORKEnvironmentSPLMeterResult : ORKResult

@property (nonatomic, assign) double sensitivityOffset;

@property (nonatomic, copy, nullable) NSArray<NSNumber *> *recordedSPLMeterSamples;

@end
6 changes: 5 additions & 1 deletion ResearchKit/ActiveTasks/ORKEnvironmentSPLMeterResult.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ @implementation ORKEnvironmentSPLMeterResult

- (void)encodeWithCoder:(NSCoder *)aCoder {
[super encodeWithCoder:aCoder];
ORK_ENCODE_DOUBLE(aCoder, sensitivityOffset);
ORK_ENCODE_OBJ(aCoder, recordedSPLMeterSamples);
}

- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
if (self) {
ORK_DECODE_DOUBLE(aDecoder, sensitivityOffset);
ORK_DECODE_OBJ_ARRAY(aDecoder, recordedSPLMeterSamples, NSNumber);
}
return self;
Expand All @@ -59,6 +61,7 @@ - (BOOL)isEqual:(id)object {

__typeof(self) castObject = object;
return (isParentSame &&
self.sensitivityOffset == castObject.sensitivityOffset &&
ORKEqualObjects(self.recordedSPLMeterSamples, castObject.recordedSPLMeterSamples)) ;
}

Expand All @@ -68,12 +71,13 @@ - (NSUInteger)hash {

- (instancetype)copyWithZone:(NSZone *)zone {
ORKEnvironmentSPLMeterResult *result = [super copyWithZone:zone];
result.sensitivityOffset = self.sensitivityOffset;
result.recordedSPLMeterSamples = [self.recordedSPLMeterSamples copy];
return result;
}

- (NSString *)descriptionWithNumberOfPaddingSpaces:(NSUInteger)numberOfPaddingSpaces {
return [NSString stringWithFormat:@"%@; recordedSPLMeterSamples: %@", [self descriptionPrefixWithNumberOfPaddingSpaces:numberOfPaddingSpaces], self.recordedSPLMeterSamples];
return [NSString stringWithFormat:@"%@; sensitivityOffset: %.1lf; recordedSPLMeterSamples: %@", [self descriptionPrefixWithNumberOfPaddingSpaces:numberOfPaddingSpaces], self.sensitivityOffset, self.recordedSPLMeterSamples];
}

@end
8 changes: 0 additions & 8 deletions ResearchKit/ActiveTasks/ORKEnvironmentSPLMeterStep.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ - (instancetype)initWithIdentifier:(NSString *)identifier {
return self;
}

- (instancetype)init {
self = [super init];
if (self) {
[self commonInit];
}
return self;
}

- (void)commonInit {
self.thresholdValue = ORKEnvironmentSPLMeterTaskDefaultThresholdValue;
self.samplingInterval = ORKEnvironmentSPLMeterTaskMinimumSamplingInterval;
Expand Down
Loading

0 comments on commit 95425a8

Please sign in to comment.