Skip to content

Commit

Permalink
reliability fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Filetti committed Jun 2, 2018
1 parent 13d1116 commit 960b93f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion PeyeDF/Eye Tracking/LSLManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class LSLManager: EyeDataProvider {
let now = Date()
if self.lastSentRaw.addingTimeInterval(self.kMinRawInterval).compare(now) == .orderedAscending {
self.sendLastRaw(rawPosition)
self.lastValidDistance = CGFloat(rawPosition.EyePositionZ)
self.lastSentRaw = now
}

Expand All @@ -132,7 +133,7 @@ class LSLManager: EyeDataProvider {
let fixationDataCallback: (Double, FixationEvent?) -> Void = {
_, fixationEvent in

guard let fixationEvent = fixationEvent else {
guard let fixationEvent = fixationEvent, fixationEvent.endTime != 0 else {
return
}

Expand Down
2 changes: 1 addition & 1 deletion PeyeDF/Eye Tracking/MidasManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class MidasManager: EyeDataProvider {
}
}

/// Called when new data arrives (in fetchdata, Alamofire, hence asynchronously)
/// Called when new data arrives (in fetchdata, HTTP Get, hence asynchronously)
fileprivate func gotData(ofKind fetchKind: MidasFetchKind, json: JSON) {
switch fetchKind {
case .eyePosition:
Expand Down
2 changes: 1 addition & 1 deletion PeyeDF/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>387</string>
<string>390</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSAppTransportSecurity</key>
Expand Down

0 comments on commit 960b93f

Please sign in to comment.