Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slower fake et gaze pointer and calib #7

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions lib/src/data/models/settings/ipad_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,38 @@ enum IPadModel {
IPadModel.iPad8_5 || IPadModel.iPad8_6 || IPadModel.iPad8_7 || IPadModel.iPad8_8 => 'iPad Pro (12.9-inch) (3rd generation)',
};
}

IPadModel get substitute {
if (value >= 0 && value <= 13) {
return this;
}
// Closest to old screenSizePixel (2360, 1640) => iPad13_16, iPad13_17, iPad13_1, iPad13_2
final similarToIPad13_1List = [
iPad16_3,
iPad16_4,
iPad14_3,
iPad14_4,
iPad13_4,
iPad13_5,
iPad13_6,
iPad13_7,
iPad8_1,
iPad8_2,
iPad8_3,
iPad8_4,
iPad8_9,
iPad8_10,
iPad14_8,
iPad14_9,
iPad14_1,
iPad14_2,
];
if (similarToIPad13_1List.contains(this)) {
return iPad13_1;
} else {
// Default: Closest to old screenSizePixel (2732, 2048) iPad8_5 ... 8_8,8_11,8_12 ; iPad13_8 ... 13_11
//similarToIPad13_11List = [iPad16_5, iPad16_6, iPad14_10, iPad14_11, iPad14_5, iPad14_6];
return iPad13_11;
}
}
}
8 changes: 4 additions & 4 deletions lib/src/test/skyle_simulated_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class SkyleSimulatedService extends SkyleServiceBase {

List<Point> gazes = List.generate(200, (index) {
return Point(
x: Random.secure().nextInt(1920).toDouble(),
y: Random.secure().nextInt(1080).toDouble(),
x: 150 + Random.secure().nextInt(100).toDouble(),
y: 0 + Random.secure().nextInt(100).toDouble(),
);
});

Expand Down Expand Up @@ -104,7 +104,7 @@ class SkyleSimulatedService extends SkyleServiceBase {
//
} else {
for (final pt in List.generate(pts.value, (index) => index)) {
await Future.delayed(const Duration(milliseconds: 100));
await Future.delayed(const Duration(milliseconds: 2000));
if (abort) return;
yield CalibMessages()
..calibPoint = CalibPoint(
Expand Down Expand Up @@ -162,7 +162,7 @@ class SkyleSimulatedService extends SkyleServiceBase {
while (!call.isCanceled) {
for (final gaze in gazes) {
yield gaze;
await Future.delayed(const Duration(milliseconds: 20));
await Future.delayed(const Duration(milliseconds: 1000));
}
}
}
Expand Down
Loading