Skip to content

Commit

Permalink
Merge branch 'main' into refactor/removed-ml-folder
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolantean authored Sep 26, 2024
2 parents 2570525 + 8cd52f3 commit 10af731
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @fedecor9 @mirland @nicolantean
6 changes: 6 additions & 0 deletions client/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,8 @@ PODS:
- TensorFlowLiteSwift/Metal (= 2.12.0)
- tflite_flutter_helper (0.1.0):
- Flutter
- wakelock_plus (0.0.1):
- Flutter

DEPENDENCIES:
- app_settings (from `.symlinks/plugins/app_settings/ios`)
Expand All @@ -1463,6 +1465,7 @@ DEPENDENCIES:
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
- tflite_flutter (from `.symlinks/plugins/tflite_flutter/ios`)
- tflite_flutter_helper (from `.symlinks/plugins/tflite_flutter_helper/ios`)
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)

SPEC REPOS:
trunk:
Expand Down Expand Up @@ -1540,6 +1543,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/tflite_flutter/ios"
tflite_flutter_helper:
:path: ".symlinks/plugins/tflite_flutter_helper/ios"
wakelock_plus:
:path: ".symlinks/plugins/wakelock_plus/ios"

SPEC CHECKSUMS:
abseil: d121da9ef7e2ff4cab7666e76c5a3e0915ae08c3
Expand Down Expand Up @@ -1593,6 +1598,7 @@ SPEC CHECKSUMS:
TensorFlowLiteSwift: 3a4928286e9e35bdd3e17970f48e53c80d25e793
tflite_flutter: 9433d086a3060431bbc9f3c7c20d017db0e72d08
tflite_flutter_helper: 6db9cadeb89c6d6468acb5faf5d06d289252ce1b
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1

PODFILE CHECKSUM: f78dd2483182dea10382b361f51daf312ce67029

Expand Down
3 changes: 3 additions & 0 deletions client/lib/core/repository/game_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'package:simon_ai/core/model/game_response.dart';
import 'package:simon_ai/core/model/hand_gesture_with_position.dart';
import 'package:simon_ai/core/model/hand_gestures.dart';
import 'package:simon_ai/ui/extensions/stream_extensions.dart';
import 'package:wakelock_plus/wakelock_plus.dart';

class GameManager {
final GestureProcessor _gestureProcessor;
Expand Down Expand Up @@ -36,6 +37,7 @@ class GameManager {
_gestureStreamController = StreamController<dynamic>.broadcast();
_processNewFrameController = StreamController<dynamic>.broadcast();
unawaited(_initializeStream());
WakelockPlus.enable().ignore();
}

Future<void> _initializeStream() async {
Expand Down Expand Up @@ -78,6 +80,7 @@ class GameManager {
await _gestureProcessor.close();
await _gestureStreamController.close();
restartStream();
await WakelockPlus.disable();
}

void restartStream() {
Expand Down
24 changes: 24 additions & 0 deletions client/pubspec.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ dependencies:
url: https://github.com/xmartlabs/tflite_flutter_helper.git
# TODO: change to master when PR merged
ref: image-conversion-fix
wakelock_plus: 1.2.8

dev_dependencies:
flutter_test:
Expand Down
1 change: 1 addition & 0 deletions client/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ void main() {
// ignore: lines_longer_than_80_chars
'Input: love, victory, pointingUp. Output: love, love, victory, love, victory, pointingUp',
() async {
TestWidgetsFlutterBinding.ensureInitialized();
final gameHandler = GameManager(MockGestureProcessor())..init();
final game = gameHandler.startSequence([
HandGesture.love,
Expand Down

0 comments on commit 10af731

Please sign in to comment.